Discussion:
RTM_LLINFO removal breaks net-snmp package build
(too old to reply)
Dave Tyson
2016-04-11 21:22:03 UTC
Permalink
Just tried to compile net-snmp under a recent current amd64 snapshot and its
failing to compile arp_sysctl.c as RTM_LLINFO is undeclared.

Dave
--
=========================================
Phone: 07805784357
Open Source O/S: www.netbsd.org
Caving: http://www.wirralcavinggroup.org.uk
=========================================

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ryota Ozaki
2016-04-12 08:29:12 UTC
Permalink
Post by Dave Tyson
Just tried to compile net-snmp under a recent current amd64 snapshot and its
failing to compile arp_sysctl.c as RTM_LLINFO is undeclared.
You need a tweak like the below patch. It's the same as the tweak
for RTF_LLINFO in ./work/net-snmp-5.7.3/agent/mibgroup/mibII/at.c.

Thanks,
ozaki-r

diff -u work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
--- work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
2016-04-12 17:21:13.000000000 +0900
+++ work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
2016-04-12 17:19:17.000000000 +0900
@@ -129,7 +129,11 @@
mib[2] = 0;
mib[3] = AF_INET;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif

err = 0;
buf = newbuf = NULL;
@@ -236,7 +240,11 @@
mib[2] = 0;
mib[3] = AF_INET6;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif

err = 0;
buf = newbuf = NULL;

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dave Tyson
2016-04-12 08:54:44 UTC
Permalink
Post by Ryota Ozaki
Post by Dave Tyson
Just tried to compile net-snmp under a recent current amd64 snapshot and
its failing to compile arp_sysctl.c as RTM_LLINFO is undeclared.
You need a tweak like the below patch. It's the same as the tweak
for RTF_LLINFO in ./work/net-snmp-5.7.3/agent/mibgroup/mibII/at.c.
Thanks,
ozaki-r
diff -u
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c ---
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
2016-04-12 17:21:13.000000000 +0900
+++ work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
2016-04-12 17:19:17.000000000 +0900
@@ -129,7 +129,11 @@
mib[2] = 0;
mib[3] = AF_INET;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif
err = 0;
buf = newbuf = NULL;
@@ -236,7 +240,11 @@
mib[2] = 0;
mib[3] = AF_INET6;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif
err = 0;
buf = newbuf = NULL;
OK, thanks for the patch. I had wondered about just setting mib[5] to zero.

Cheers,
Dave
--
=========================================
Phone: 07805784357
Open Source O/S: www.netbsd.org
Caving: http://www.wirralcavinggroup.org.uk
=========================================

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ryota Ozaki
2016-04-12 09:13:38 UTC
Permalink
Post by Dave Tyson
Post by Ryota Ozaki
Post by Dave Tyson
Just tried to compile net-snmp under a recent current amd64 snapshot and
its failing to compile arp_sysctl.c as RTM_LLINFO is undeclared.
You need a tweak like the below patch. It's the same as the tweak
for RTF_LLINFO in ./work/net-snmp-5.7.3/agent/mibgroup/mibII/at.c.
Thanks,
ozaki-r
diff -u
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c ---
work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig
2016-04-12 17:21:13.000000000 +0900
+++ work/net-snmp-5.7.3/agent/mibgroup/ip-mib/data_access/arp_sysctl.c
2016-04-12 17:19:17.000000000 +0900
@@ -129,7 +129,11 @@
mib[2] = 0;
mib[3] = AF_INET;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif
err = 0;
buf = newbuf = NULL;
@@ -236,7 +240,11 @@
mib[2] = 0;
mib[3] = AF_INET6;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
mib[5] = RTF_LLINFO;
+#else
+ mib[5] = 0;
+#endif
err = 0;
buf = newbuf = NULL;
OK, thanks for the patch. I had wondered about just setting mib[5] to zero.
Ask FreeBSD guys :) I just mimicked their interface (*). Anyway
the fix should work for FreeBSD as well.

(*) FreeBSD and NetBSD now have RTF_LLDATA flag for the purpose,
so using it may be better.

ozaki-r

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...