ports/net/arp-scan/patches/patch-link-bpf_c

15 lines
419 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: link-bpf.c
--- link-bpf.c.orig
+++ link-bpf.c
@@ -91,6 +91,10 @@ get_hardware_address(const char *if_name, unsigned cha
*/
for (p = buf; p < buf + len; p += ifm->ifm_msglen) {
ifm = (struct if_msghdr *)p;
+
+ if (ifm->ifm_version != RTM_VERSION)
+ continue;
+
sdl = (struct sockaddr_dl *)(ifm + 1);
if (ifm->ifm_type != RTM_IFINFO || (ifm->ifm_addrs & RTA_IFP) == 0)