summaryrefslogtreecommitdiffstats
path: root/contrib/isc-dhcp/client/dhclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/isc-dhcp/client/dhclient.c')
-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