mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-01 01:17:02 +00:00
22667fa925
Some of the shared library magic is very hackish, however the net-snmp library building make-fu is hackish as well, so I don't feel bad about it. This commit also (re-)enables the host module for much more information. It also fixes a long standing bug where 'snmpwalk localhost public' would hang.
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
--- agent/mibgroup/mibII/interfaces.c.orig Fri Dec 1 14:17:21 2000
|
|
+++ agent/mibgroup/mibII/interfaces.c Thu Jan 18 00:04:42 2001
|
|
@@ -129,7 +129,7 @@
|
|
#if HAVE_SYS_SYSCTL_H
|
|
#include <sys/sysctl.h>
|
|
|
|
-#ifdef freebsd3
|
|
+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
|
|
# define USE_SYSCTL_IFLIST
|
|
#else
|
|
# if defined(CTL_NET) && !defined(freebsd2)
|
|
@@ -1842,10 +1842,18 @@
|
|
physaddrbuf = 0;
|
|
}
|
|
ifm = (struct if_msghdr *)rtm;
|
|
+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
|
|
+ if (physaddrs != 0) physaddrs[naddrs] = (void*)(ifm + 1);
|
|
+ naddrs++;
|
|
+#endif
|
|
ilen -= ifm->ifm_msglen;
|
|
cp += ifm->ifm_msglen;
|
|
rtm = (struct rt_msghdr *)cp;
|
|
while (ilen > 0 && rtm->rtm_type == RTM_NEWADDR) {
|
|
+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
|
|
+ ilen -= rtm->rtm_msglen;
|
|
+ cp += rtm->rtm_msglen;
|
|
+#else
|
|
int is_alias = 0;
|
|
ifam = (struct ifa_msghdr *)rtm;
|
|
ilen -= sizeof(*ifam);
|
|
@@ -1868,6 +1876,7 @@
|
|
}
|
|
sa = (struct sockaddr *)cp;
|
|
}
|
|
+#endif
|
|
rtm = (struct rt_msghdr *)cp;
|
|
}
|
|
}
|
|
@@ -1982,7 +1991,7 @@
|
|
if (ifmd.ifmd_data.ifi_lastchange.tv_sec == 0 &&
|
|
ifmd.ifmd_data.ifi_lastchange.tv_usec == 0) {
|
|
long_return = 0;
|
|
- else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec)
|
|
+ } else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec) {
|
|
long_return = 0;
|
|
} else {
|
|
long_return = (u_long)
|