diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2002-07-25 19:03:01 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2002-07-25 19:03:01 +0800 |
commit | ce0cc429a2af7cad72d4805a81bf55a4e292270c (patch) | |
tree | 10f31622c2863cafe59d9ef68708fe635b40d5c8 /net/net-snmp | |
parent | c67d314cc5e8ec9b2cf8c6d8c17a95f4bfca269c (diff) | |
download | freebsd-ports-gnome-ce0cc429a2af7cad72d4805a81bf55a4e292270c.tar.gz freebsd-ports-gnome-ce0cc429a2af7cad72d4805a81bf55a4e292270c.tar.zst freebsd-ports-gnome-ce0cc429a2af7cad72d4805a81bf55a4e292270c.zip |
o Fix string representation of IPv6 address for libwrap's address
matching.
o Add a note that numeric address is required for snmpd in
/etc/hosts.allow.
Guided by: ume
Diffstat (limited to 'net/net-snmp')
-rw-r--r-- | net/net-snmp/Makefile | 1 | ||||
-rw-r--r-- | net/net-snmp/files/patch-snmpTCPIPv6Domain.c | 30 | ||||
-rw-r--r-- | net/net-snmp/files/patch-snmpUCDIPv6Domain.c | 30 | ||||
-rw-r--r-- | net/net-snmp/files/patch-snmpd.1.def | 13 |
4 files changed, 74 insertions, 0 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index 5d5d68f659b4..0e76f7225b3d 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -7,6 +7,7 @@ PORTNAME= net-snmp PORTVERSION= 5.0.2 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \ diff --git a/net/net-snmp/files/patch-snmpTCPIPv6Domain.c b/net/net-snmp/files/patch-snmpTCPIPv6Domain.c new file mode 100644 index 000000000000..fcfc1e672d9d --- /dev/null +++ b/net/net-snmp/files/patch-snmpTCPIPv6Domain.c @@ -0,0 +1,30 @@ +--- snmplib/snmpTCPIPv6Domain.c.orig Wed Jul 17 03:20:43 2002 ++++ snmplib/snmpTCPIPv6Domain.c Thu Jul 25 19:55:47 2002 +@@ -62,13 +62,21 @@ + if (to == NULL) { + return strdup("TCP/IPv6: unknown"); + } else { +- char addr[INET6_ADDRSTRLEN]; +- char tmp[INET6_ADDRSTRLEN + 8]; ++ char tmp[NI_MAXHOST]; + +- sprintf(tmp, "[%s]:%hd", +- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, +- INET6_ADDRSTRLEN), ntohs(to->sin6_port)); +- return strdup(tmp); ++/* ++ * NI_WITHSCOPEID will be obsoleted. But some implementations require ++ * this flag to retrieve scoped name. ++ * (2002-07-25: kuriyama@FreeBSD.org) ++ */ ++#ifndef NI_WITHSCOPEID ++#define NI_WITHSCOPEID 0 ++#endif ++ if (getnameinfo(to, sizeof(struct sockaddr_in6), tmp, sizeof(tmp), ++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID)) { ++ return strdup("UDP/IPv6: unknown"); ++ } ++ return strdup(tmp); + } + } + diff --git a/net/net-snmp/files/patch-snmpUCDIPv6Domain.c b/net/net-snmp/files/patch-snmpUCDIPv6Domain.c new file mode 100644 index 000000000000..33b240f33d1c --- /dev/null +++ b/net/net-snmp/files/patch-snmpUCDIPv6Domain.c @@ -0,0 +1,30 @@ +--- snmplib/snmpUDPIPv6Domain.c.orig Mon Jul 8 11:03:05 2002 ++++ snmplib/snmpUDPIPv6Domain.c Thu Jul 25 19:31:27 2002 +@@ -59,13 +59,21 @@ + if (to == NULL) { + return strdup("UDP/IPv6: unknown"); + } else { +- char addr[INET6_ADDRSTRLEN]; +- char tmp[INET6_ADDRSTRLEN + 8]; ++ char tmp[NI_MAXHOST]; + +- sprintf(tmp, "[%s]:%hd", +- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, +- INET6_ADDRSTRLEN), ntohs(to->sin6_port)); +- return strdup(tmp); ++/* ++ * NI_WITHSCOPEID will be obsoleted. But some implementations require ++ * this flag to retrieve scoped name. ++ * (2002-07-25: kuriyama@FreeBSD.org) ++ */ ++#ifndef NI_WITHSCOPEID ++#define NI_WITHSCOPEID 0 ++#endif ++ if (getnameinfo(to, sizeof(struct sockaddr_in6), tmp, sizeof(tmp), ++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID)) { ++ return strdup("UDP/IPv6: unknown"); ++ } ++ return strdup(tmp); + } + } + diff --git a/net/net-snmp/files/patch-snmpd.1.def b/net/net-snmp/files/patch-snmpd.1.def new file mode 100644 index 000000000000..6c3db6228f1e --- /dev/null +++ b/net/net-snmp/files/patch-snmpd.1.def @@ -0,0 +1,13 @@ +--- man/snmpd.1.def.orig Tue May 7 06:28:37 2002 ++++ man/snmpd.1.def Thu Jul 25 18:49:40 2002 +@@ -205,6 +205,10 @@ + the error "Error opening specified endpoint". Likewise, since AAL5 + PVC support is only currently available on Linux, it will fail with + the same error on other platforms. ++.PP ++.B snmpd ++uses libwrap's access control if configured by --with-libwrap. ++Access control patterns may only reference IP addresses. + + .RE + .SH CONFIGURATION FILES |