Skip to content

Install BPF filter to only capture ARP replies on macOS#27

Merged
krjakbrjak merged 1 commit intomainfrom
VNI-bpf-filter
Feb 19, 2026
Merged

Install BPF filter to only capture ARP replies on macOS#27
krjakbrjak merged 1 commit intomainfrom
VNI-bpf-filter

Conversation

@krjakbrjak
Copy link
Contributor

  • Previously the BPF device received all packets on the interface and discarded non-ARP traffic in userspace. Install a kernel-level BPF filter (BIOCSETF) that only passes ARP reply frames (EtherType 0x0806, opcode 2), avoiding unnecessary copies on busy networks.

  • Uses golang.org/x/net/bpf for typed filter instructions and its VM for testing.

* Previously the BPF device received all packets on the interface and
  discarded non-ARP traffic in userspace. Install a kernel-level BPF
  filter (BIOCSETF) that only passes ARP reply frames (EtherType 0x0806,
  opcode 2), avoiding unnecessary copies on busy networks.

* Uses golang.org/x/net/bpf for typed filter instructions and its VM
  for testing.

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
@krjakbrjak krjakbrjak merged commit 8c55f2a into main Feb 19, 2026
1 check passed
@krjakbrjak krjakbrjak deleted the VNI-bpf-filter branch February 19, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant