diff options
Diffstat (limited to 'net/ucd-snmp/patches/patch-af')
-rw-r--r-- | net/ucd-snmp/patches/patch-af | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/net/ucd-snmp/patches/patch-af b/net/ucd-snmp/patches/patch-af new file mode 100644 index 00000000000..e09f76d18e8 --- /dev/null +++ b/net/ucd-snmp/patches/patch-af @@ -0,0 +1,46 @@ +$NetBSD: patch-af,v 1.1 1999/08/15 11:07:14 tron Exp $ + +--- agent/mibgroup/mibII/interfaces.c.orig Tue Mar 16 00:46:12 1999 ++++ agent/mibgroup/mibII/interfaces.c Thu Jun 17 10:21:06 1999 +@@ -114,7 +114,7 @@ + + #if HAVE_SYS_SYSCTL_H + #include <sys/sysctl.h> +-# if defined(CTL_NET) && !defined(freebsd2) ++# if defined(CTL_NET) && !defined(freebsd2) && !defined(netbsd1) + # ifdef PF_ROUTE + # ifdef NET_RT_IFLIST + # define USE_SYSCTL_IFLIST +@@ -1462,16 +1462,31 @@ + cp = strchr(saveName, '\0'); + string_append_int (cp, ifnet.if_unit); + #endif +- if (1 || strcmp(saveName,"lo0") != 0) { /* XXX */ ++ if (1) { /* XXX */ + /* + * Try to find an address for this interface + */ + + auto_nlist(IFADDR_SYMBOL, (char *)&ia, sizeof(ia)); ++#ifdef netbsd1 ++ ia=(struct in_ifaddr *)ifnet.if_addrlist.tqh_first; ++#endif + while (ia) { + klookup((unsigned long)ia , (char *)&in_ifaddr, sizeof(in_ifaddr)); ++#ifdef netbsd1 ++#define CP(x) ((char *)(x)) ++{ char *cp; struct sockaddr * sa; ++ cp = (CP(in_ifaddr.ia_ifa.ifa_addr) - CP(ia)) + ++ CP(&in_ifaddr); sa = (struct sockaddr *)cp; ++if (sa->sa_family==AF_INET) ++#endif + if (in_ifaddr.ia_ifp == ifnetaddr) break; ++} ++#ifdef netbsd1 ++ ia=(struct in_ifaddr *)in_ifaddr.ia_ifa.ifa_list.tqe_next; ++#else + ia = in_ifaddr.ia_next; ++#endif + } + + #if !defined(netbsd1) && !defined(freebsd2) && !defined(openbsd2) && !defined(STRUCT_IFNET_HAS_IF_ADDRLIST) |