[RFC] Use noafif in dhcpif and sycndhcpif

Xin LI delphij at delphij.net
Wed Sep 21 23:40:35 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

While developing FreeNAS we have hit a problem -- when
ifconfig_DEFAULT is set to "DHCP", all interfaces including pfsync0
and pflog0 would be probed by dhclient.

It seems to be reasonable to check noafif in both dhcpif and
syncdhcpif, as did in ipv6_autoconfif based on same reasoning.

Comments?

Cheers,
- -- 
Xin LI <delphij at delphij.net>	https://www.delphij.net/
FreeBSD - The Power to Serve!		Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJOenXrAAoJEATO+BI/yjfBrf8IALBR6K/0IYMZbFgbcQ6xYCRt
f6KKQ/S+sN4gge0/HAlv4i2oKGCkDBAkTmOk6vJ0d1I80sOalmIlWm8tMWahzKq+
SOw5YBOV4rx3CSVFq+X7vF+R9HH/y1wt4RgFYpeuVg6hlCi0Ea1pi18Wc+fmsbSU
F+l8/8owRip/i9rvhrCyz5+HrYSESqXeAA7NTk6r6+llo8QcGzlqLFdSkVvRKE6B
nYnYr5lCO+1xllXy5mTqDwZr00Fz1+d4ZBz62olABl2xtGcepHxRd9rKomlLDnY4
Cp10/ChR20I7X4FYNIX/C6gRwKAxxXOHwR3dPnEy2OFZU/4uvNFgIC6rtFapaSg=
=WN1r
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: etc/network.subr
===================================================================
--- etc/network.subr	(revision 225709)
+++ etc/network.subr	(working copy)
@@ -297,6 +297,10 @@ dhcpif()
 	local _tmpargs _arg
 	_tmpargs=`_ifconfig_getargs $1`
 
+	if noafif $1; then
+		return 1
+	fi
+
 	for _arg in $_tmpargs; do
 		case $_arg in
 		[Dd][Hh][Cc][Pp])
@@ -322,6 +326,10 @@ syncdhcpif()
 	local _tmpargs _arg
 	_tmpargs=`_ifconfig_getargs $1`
 
+	if noafif $1; then
+		return 1
+	fi
+
 	for _arg in $_tmpargs; do
 		case $_arg in
 		[Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp])


More information about the freebsd-rc mailing list