Date: Tue, 3 Aug 2010 12:42:30 -0500 From: Brooks Davis <brooks@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: net@freebsd.org Subject: Re: vlan(4) interfaces have wrong interface type in sockaddr_dl address Message-ID: <20100803174230.GA87066@lor.one-eyed-alien.net> In-Reply-To: <201008031217.27479.jhb@freebsd.org> References: <201008031029.11284.jhb@freebsd.org> <201008031217.27479.jhb@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Tue, Aug 03, 2010 at 12:17:27PM -0400, John Baldwin wrote: > On Tuesday, August 03, 2010 10:29:11 am John Baldwin wrote: > > Currently vlan(4) interfaces have an interface type of IFT_ETHER instead of > > IFT_L2VLAN in the sockaddr_dl that is returned by getifaddrs(3). If you do a > > route lookup for a route that goes across a vlan then the sockaddr_dl > > generated for the routing message will specify IFT_L2VLAN (you can see it as > > 'arp -a' shows [vlan] instead of [ethernet] for those routes). However, the > > address returned via getifaddrs(3) has a type of IFT_ETHER. I think this is a > > bug of omission in that the vlan attach code needs to update the sockaddr_dl > > that is initialized in ether_ifattach(). This patch does that and fixes > > getifaddrs(3). Any objections? > > A few places in userland also need fixing to catch up to this I think. I did > not patch getnameinfo(3) in libc since it explicitly claims in the comments > that IFT_L2VLAN interfaces have a zero-length address (even though this claim > is false in practice). Updated patch: This seems like the right thing to do. I might suggest merging the userspace changes well before the kernel changes or the results may be confusing. -- Brooks [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFMWFUFXY6L6fI4GtQRAtlJAJ9Hkm92at0kNSAUBupFQw2sF6s8jgCeMU3I BobDKg6wslhAn4CzuYzYpsQ= =wCM6 -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100803174230.GA87066>
