tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vlan and bpf [NOW SOLVED MOSTLY]



Roy Marples <roy%marples.name@localhost> writes:

>  ---- On Fri, 15 Dec 2023 17:11:17 +0000  Greg Troxel  wrote --- 
>  > I am using vlans (on wm0 and vlan0), and when I run tcpdump on the
>  > parent, I see the packets that are on the vlan.
>  > 
>  > This is causing trouble because dhcpd is seeing them.
>  
> This is a general grump I have with dhcpd and kea (which is meant as the replacement for dhcpd).
> They are not fit for purpose with any BSD as far as I can tell as they just don't work as expected anything in a bridge.
> If I had more time I would sit down and write a decent DHCP server, but time is something I don't have for this right now :/

I can certainly understand that dhcpd is crufty.  But it is not at fault
here; NetBSD 9 is presenting packets on bpf incorrectly.

What is the right thing in a bridge and what it does is another subject....


I was (offlist) pointed to this being implemented in NetBSD 10:

  https://mail-index.netbsd.org/source-changes-hg/2022/06/20/msg356979.html

Basically, ether_input's bpf processing checks if there is a vlan tag
and if so conses up the vlan header that was on the wire, so the packet
as it appears on the parent's bpf stream looks like a vlan packet,
rather than incorrectly like the inner packet.

I'll likely pull this into my source tree and maybe send a pullup.
While adding vlan decoding for bpf is a feature, omitting the packet as
appearing natively is a bugfix.


Home | Main Index | Thread Index | Old Index