summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2021-11-20 11:47:03 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2021-11-20 11:47:03 +0000
commitee5776b12e5180e78ce36c85929eb86ed1c63417 (patch)
treefb43973a49ca38512f0d1bea54e42f7bd7360857 /usr.sbin
parent363a2f7d9e7141898d0af93a8a725c8ed299fc56 (diff)
Start on DOWN interfaces
Do not skip interfaces during startup because they're not UP. dhcpd(8) can start listening on such interfaces just fine (given suitable IPs on them) and interfaces may come UP later in time. Otherwise dhcpd would fail to start completely if it didn't find any interface that would be UP early on and administrators had to restart dhcpd. Other daemons and nc(1)'s `-l' listen just fine on DOWN interfaces as well. Noticed while switching a bridge(4)/vether(4) setup to veb(4)/vport(4) and hostname.vport without explicit "up" (vport does not implicitly pulls itself UP when configuring an address). OK dlg florian
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcpd/dispatch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/dispatch.c b/usr.sbin/dhcpd/dispatch.c
index 7c456512940..8b8972be996 100644
--- a/usr.sbin/dhcpd/dispatch.c
+++ b/usr.sbin/dhcpd/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.43 2017/04/12 19:17:30 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.44 2021/11/20 11:47:02 kn Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999
@@ -112,13 +112,12 @@ discover_interfaces(int *rdomain)
for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
/*
* See if this is the sort of interface we want to
- * deal with. Skip loopback, point-to-point and down
+ * deal with. Skip loopback and point-to-point
* interfaces, except don't skip down interfaces if we're
* trying to get a list of configurable interfaces.
*/
if ((ifa->ifa_flags & IFF_LOOPBACK) ||
(ifa->ifa_flags & IFF_POINTOPOINT) ||
- (!(ifa->ifa_flags & IFF_UP)) ||
(!(ifa->ifa_flags & IFF_BROADCAST)))
continue;