From: kn Date: Sat, 20 Nov 2021 11:47:02 +0000 (+0000) Subject: Start on DOWN interfaces X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=532910db879d6e882cf67a780ce1aa037a95ec64;p=openbsd 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 --- 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;