From f318bbf9d2ecca80486c91cf0a8855ede363195e Mon Sep 17 00:00:00 2001 From: mbr Date: Sat, 9 Aug 2003 20:44:08 +0000 Subject: [PATCH] Fix devices which do not support ifm_status. Always return TRUE for them. Reported by: mdodd Tested by: Craig Rodrigues --- contrib/isc-dhcp/client/dhclient.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/contrib/isc-dhcp/client/dhclient.c b/contrib/isc-dhcp/client/dhclient.c index 6ac955bcbbb..d6f3c006f35 100644 --- a/contrib/isc-dhcp/client/dhclient.c +++ b/contrib/isc-dhcp/client/dhclient.c @@ -3288,19 +3288,24 @@ interface_active(struct interface_info *ip) { return (HAVELINK); } } - } - - /* - * If dhclient.conf contains media settings, we cannot - * abort if the interface is not set to active mode. - */ - if (ip -> havemedia && ip -> client -> state != S_BOUND) + /* + * If dhclient.conf contains media settings, we cannot + * abort if the interface is not set to active mode. + */ + if (ip -> havemedia && ip -> client -> state != S_BOUND) + return (HAVELINK); + } else { + /* + * IFM_AVALID is not set. We cannot check + * the link state. Assume HAVELINK. + */ return (HAVELINK); - + } /* * We really have no link. */ return (NOLINK); + #else /* ifdef __FreeBSD__ */ /* -- 2.45.2