freebsd-ports/net/wackamole/files/patch-arpcache.c
Robert Clausecker 4d98b01b6f net/wackamole: Fix build on armv7
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
2022-08-16 15:51:50 +01:00

11 lines
436 B
C

--- arpcache.c.orig 2022-08-01 22:18:16 UTC
+++ arpcache.c
@@ -153,7 +153,7 @@ void sample_arp_cache() {
h = arpcache_private[count].mac;
wack_alarm(ARPING, "Adding: (private) %s [%02x:%02x:%02x:%02x:%02x:%02x]",
inet_ntoa(sa->sin_addr),
- *(h++), *(h++), *(h++), *(h++), *(h++), *(h++));
+ h[0], h[1], h[2], h[3], h[4], h[5]);
count++;
}
arpcache_private[count].ip = 0;