Patch for bpf.c Ethertype for VLAN interfaces
sthaug at nethelp.no
sthaug at nethelp.no
Sun May 18 17:29:36 UTC 2014
Newer versions of FreeBSD return type IFT_L2VLAN instead of IFT_ETHER
for VLAN interfaces when using getifaddrs(). This bit me today when
upgrading a server from FreeBSD 8.4-STABLE to 9.2-STABLE. The fix
for this is already in the isc-dhcp42-server FreeBSD ports version.
I would greatly appreciate if this fix could be included in the main
ISC version, since it is a showstopper (server doesn't start) if you
use bpf.c with VLAN interfaces:
May 18 17:08:19 slam dhcpd: Unsupported device type 135 for "em0.88"
May 18 17:08:19 slam dhcpd: exiting.
I have put an extra #ifdef around the relevant line, since there may
be older Unix versions which don't define IFT_L2VLAN. Patch against
dhcp-4.3.0 below.
Steinar Haug, Nethelp consulting, sthaug at nethelp.no
----------------------------------------------------------------------
--- common/bpf.c.orig 2014-01-31 20:20:49.000000000 +0100
+++ common/bpf.c 2014-05-18 18:59:06.000000000 +0200
@@ -578,6 +578,9 @@
*/
switch (sa->sdl_type) {
case IFT_ETHER:
+#if defined (IFT_L2VLAN)
+ case IFT_L2VLAN:
+#endif
hw->hlen = sa->sdl_alen + 1;
hw->hbuf[0] = HTYPE_ETHER;
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
More information about the dhcp-users
mailing list