Index: bpf.c =================================================================== RCS file: /cvs/src/sbin/dhcpleased/bpf.c,v retrieving revision 1.2 diff -u -p -r1.2 bpf.c --- bpf.c 2 Mar 2021 19:20:13 -0000 1.2 +++ bpf.c 28 Jun 2022 07:36:42 -0000 @@ -133,6 +133,7 @@ get_bpf_sock(const char *name) struct ifreq ifr; u_int sz; int flag = 1, fildrop = BPF_FILDROP_CAPTURE; + unsigned int dlt = DLT_EN10MB; int bpffd; if ((bpffd = open("/dev/bpf", O_RDWR | O_CLOEXEC | O_NONBLOCK)) == -1) @@ -179,6 +180,9 @@ get_bpf_sock(const char *name) close(bpffd); return -1; } + + if (ioctl(bpffd, BIOCSDLT, &dlt) == -1) + fatal("BIOCSDLT DLT_EN10MB"); if (ioctl(bpffd, BIOCLOCK, NULL) == -1) fatal("BIOCLOCK");