This allows the use of VLAN PCP in dhclient, which is required for
certain ISPs (such as Orange.fr).
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential D31263
bpf: Add an ioctl to set the VLAN Priority on packets sent by bpf kp on Jul 21 2021, 7:32 PM. Authored by Tags None Referenced Files
Details
This allows the use of VLAN PCP in dhclient, which is required for MFC after: 1 week
Diff Detail
Event TimelineComment Actions Do I understand correctly, that this is the first bpf-option to alter the packet in transit? Comment Actions net80211 has a whole chunk of things you can set when raw tx'ing frames via BPF. I think this is fine! Comment Actions We're modifying a packet (or to be more exact, adding a tag that will modify it when it hits if_vlan) we've injected ourselves, in bpfwrite(). I don't think that's an issue.
It'd be a bit odd to change the network configuration for the sake of a handful of DHCP packets, when all other traffic flows just fine, but yes, that could also work. Still, it makes more sense to give dhclient control over its own destiny, and allow the PCP to also be set through bpf. It's very similar to say setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));, which also affects the packet (and is also similar in that it affects a protocol layer below what we're actually providing from userspace), only there it's through a socket rather than bpf. Comment Actions Overall, this patch looks good to me.
|