BPF writes on DLT_NULL devices
Matthew Luckie
mjl at luckie.org.nz
Thu Jun 16 09:51:39 GMT 2005
Hi -current
I'm writing to see if I can find someone to review and commit a patch I
submitted to PR 82157 as suggested by re@
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/82157
The patch attempts to tidy up the mess that is BPF write on DLT_NULL
devices.
Some of these devices are handy to write to, e.g. tun, gif, and gre.
There are a number of limitations and flaws in the -current code; namely
* not all DLT_NULL devices support bpf write, including gif and gre
* write() will fail if trying to send a packet larger than the IP MTU
less 4 bytes, due to bpf_movein not taking into account the psuedo header
* if_loop.c checks for bpf write in if_simloop; however the only device
passing a packet via BPF to that function is looutput, yet looutput will
return EAFNOSUPPORT because AF_UNSPEC is not checked in that function.
Full details, including test code and a patch is available in the PR
Any takers?
Matthew
More information about the freebsd-current
mailing list