4d98b01b6f
Jails may not have a bpf(4) device, but can still build with BPF. - fix the configure test for BPF detection - define LICENSE - fix two obvious bugs in the code PR: 265561 Approved by: maintainer timeout, >2 weeks MFH: 2022Q3
11 lines
463 B
C
11 lines
463 B
C
--- ife-bpf.c.orig 2022-08-01 22:25:04 UTC
|
|
+++ ife-bpf.c
|
|
@@ -58,7 +58,7 @@ if_send_spoof_request(char *dev,
|
|
static unsigned char my_mac[ETH_ALEN];
|
|
static unsigned char bc_mac[ETH_ALEN] =
|
|
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
|
- memset(&ifr, sizeof(struct ifreq), 0);
|
|
+ memset(&ifr, 0, sizeof(struct ifreq));
|
|
strncpy(ifr.ifr_name, dev, IFNAMSIZ);
|
|
if (ioctl(_if_bpf, BIOCSETIF, (caddr_t)&ifr) < 0) {
|
|
perror("ioctl (BIOCSETIF)");
|