On 2016/06/06 16:15, Vincent Gross wrote: > When sending ARP requests, or when writing to a bpf handle (as when > sending DHCP Discover), we bypass pf(4) so we have no way to define > the priority (m->m_pkthdr.pf.prio) of the outgoing packets. > > My ISP runs two vlans to separate the delivery of general-purpose > internet and TV/phone over fiber; on the internet vlan, any frame with > a priority different from 0 is dropped; because we use m_pkthdr.pf.prio > to define this priority, and the default priority IFQ_DEFPRIO == 3, > all of my ARP and DHCP frames are dropped when I use a stock OpenBSD > kernel. > > This diff adds > 1) an if_llprio field to struct ifnet
struct if_data.. this is used by enough ports that changing the abi is a pain; it can be done if necessary, but it means searching over unpacked ports source to identify the affected ports and bumping REVISION to ensure that they get updated. Adding to the end of the struct would make things easier than adding to the middle. Alternatively if we are going to add to the middle I'd like some spare bytes so we don't have to do it so often in future.. > diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 BTW. patch warns about offsets if you apply this to -current. If you're working from a git mirror, I think the correct way to do it is generate diffs against cvs for sending, then you can verify yourself that they are right and the patch didn't mangle something and that other changes in the file didn't invalidate anything (The same would apply if this was a cvs diff done against a tree that wasn't updated, it means other people will be testing something different than you are using.) Other than these points, it seems a useful thing to do, pppoe could use it too. I wonder what these broken ISP devices are that require the priority field in the vlan frame header to be 0 (aka "prio 1")...
