Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2011 16:40:27 -0700
From:      Xin LI <delphij@delphij.net>
To:        freebsd-rc@FreeBSD.ORG
Cc:        Hiroki Sato <hrs@FreeBSD.org>, Garrett Cooper <gcooper@FreeBSD.ORG>
Subject:   [RFC] Use noafif in dhcpif and sycndhcpif
Message-ID:  <4E7A75EB.80308@delphij.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
-----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@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-----

[-- Attachment #2 --]
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])

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E7A75EB.80308>