a2600d7825
(due the deprecation of RTF_LLINFO). Bump PKGREVISION. Reviewed by <ozaki-r>.
33 lines
769 B
Text
33 lines
769 B
Text
$NetBSD: patch-ac,v 1.3 2016/04/18 08:34:35 leot Exp $
|
|
|
|
--- arp.c.orig 2000-11-14 15:51:03.000000000 +0000
|
|
+++ arp.c
|
|
@@ -17,7 +17,7 @@
|
|
#include <sys/sysctl.h>
|
|
#include <net/if_dl.h>
|
|
#include <net/route.h>
|
|
-#ifdef __FreeBSD__ /* XXX */
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__) /* XXX */
|
|
#define ether_addr_octet octet
|
|
#endif
|
|
#else /* !BSD */
|
|
@@ -32,6 +32,7 @@
|
|
#include <netinet/if_ether.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
#ifdef BSD
|
|
@@ -51,7 +52,11 @@ arp_cache_lookup(in_addr_t ip, struct et
|
|
mib[2] = 0;
|
|
mib[3] = AF_INET;
|
|
mib[4] = NET_RT_FLAGS;
|
|
+#ifdef RTF_LLDATA
|
|
+ mib[5] = RTF_LLDATA;
|
|
+#else
|
|
mib[5] = RTF_LLINFO;
|
|
+#endif
|
|
|
|
if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0)
|
|
return (-1);
|