NetBSD/sys
ozaki-r 39ce7d7534 bpf: support sending packets on loopback interfaces
Previously sending packets on a loopback interface via bpf failed
because the packets are treated as AF_UNSPEC by bpf and the loopback
interface couldn't handle such packets.

This fix enables user programs to prepend a protocol family (AF_INET or
AF_INET6) to a payload.  bpf interprets it and treats a packet as so,
not just AF_UNSPEC.  The protocol family is encoded as 4 bytes, host byte
order as per DLT_NULL in the specification(*).

(*) https://www.tcpdump.org/linktypes.html

Proposed on tech-net and tech-kern
2022-11-30 06:02:37 +00:00
..
altq
arch Bump MSGBUFSIZE to 32k; 4k just about overflows "by default" with qemu 2022-11-27 14:54:25 +00:00
coda
compat
conf
crypto
ddb
dev move the creation of machdep.smbios into platform_init(). 2022-11-25 22:17:20 +00:00
dist/pf
dtb
external
fs
gdbscripts
kern kern/vfs_lockf.c: Parenthesize to make arithmetic match check. 2022-11-25 16:15:39 +00:00
lib
miscfs
modules
net bpf: support sending packets on loopback interfaces 2022-11-30 06:02:37 +00:00
net80211
netatalk
netbt
netcan
netinet Support explicit unnumbered interface. 2022-11-25 08:39:32 +00:00
netinet6
netipsec
netmpls
nfs
opencrypto
rump
secmodel
stand
sys Welcome to 9.99.107 2022-11-25 08:40:15 +00:00
ufs the UFS_EXTATTR option was supposed to affect only UFS1 file systems, 2022-11-28 04:52:04 +00:00
uvm mmap(2): Avoid arithmetic overflow in search for free space. 2022-11-23 23:53:53 +00:00
Makefile