dhclient problem with xl0

Martin Blapp mb at imp.ch
Sat Aug 9 13:29:39 PDT 2003


Argl, of course the patch was wrong. Ok, this should work
now ...

--- contrib/isc-dhcp/client/dhclient.c.orig	Thu Aug  7 16:58:46 2003
+++ contrib/isc-dhcp/client/dhclient.c	Sat Aug  9 21:47:14 2003
@@ -3288,19 +3288,24 @@
 				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)
+			return (HAVELINK);
+	} else {
+		/*
+		 * IFM_AVALID is not set. We cannot check
+		 * the link state. Assume HAVELINK.
+		 */
+		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)
-		return (HAVELINK);
-
 	/*
 	 * We really have no link.
 	 */
 	return (NOLINK);
+
 #else /* ifdef __FreeBSD__ */

 	/*


More information about the freebsd-current mailing list