summaryrefslogtreecommitdiffstats
path: root/contrib/isc-dhcp
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-08-09 20:44:08 +0000
committermbr <mbr@FreeBSD.org>2003-08-09 20:44:08 +0000
commitf318bbf9d2ecca80486c91cf0a8855ede363195e (patch)
tree0438c3670ff5ea604e6c85e11fc6725fd642bcbb /contrib/isc-dhcp
parent28a1a9c3f29d8e5a2149244cea778bfc56a63e98 (diff)
downloadFreeBSD-src-f318bbf9d2ecca80486c91cf0a8855ede363195e.zip
FreeBSD-src-f318bbf9d2ecca80486c91cf0a8855ede363195e.tar.gz
Fix devices which do not support ifm_status. Always return
TRUE for them. Reported by: mdodd Tested by: Craig Rodrigues <rodrigc@crodrigues.org>
Diffstat (limited to 'contrib/isc-dhcp')
-rw-r--r--contrib/isc-dhcp/client/dhclient.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/contrib/isc-dhcp/client/dhclient.c b/contrib/isc-dhcp/client/dhclient.c
index 6ac955b..d6f3c00 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__ */
/*
OpenPOWER on IntegriCloud