diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2002-07-25 11:03:01 +0000 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2002-07-25 11:03:01 +0000 |
commit | ce0cc429a2af7cad72d4805a81bf55a4e292270c (patch) | |
tree | 10f31622c2863cafe59d9ef68708fe635b40d5c8 /net-mgmt | |
parent | c67d314cc5e8ec9b2cf8c6d8c17a95f4bfca269c (diff) | |
download | FreeBSD-ports-ce0cc429a2af7cad72d4805a81bf55a4e292270c.zip FreeBSD-ports-ce0cc429a2af7cad72d4805a81bf55a4e292270c.tar.gz |
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-mgmt')
-rw-r--r-- | net-mgmt/net-snmp-devel/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-snmpd.1.def | 13 | ||||
-rw-r--r-- | net-mgmt/net-snmp/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-snmpTCPIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-snmpd.1.def | 13 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c | 30 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-snmpd.1.def | 13 |
12 files changed, 222 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile index 5d5d68f..0e76f72 100644 --- a/net-mgmt/net-snmp-devel/Makefile +++ b/net-mgmt/net-snmp-devel/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-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c new file mode 100644 index 0000000..fcfc1e6 --- /dev/null +++ b/net-mgmt/net-snmp-devel/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-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c new file mode 100644 index 0000000..33b240f --- /dev/null +++ b/net-mgmt/net-snmp-devel/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-mgmt/net-snmp-devel/files/patch-snmpd.1.def b/net-mgmt/net-snmp-devel/files/patch-snmpd.1.def new file mode 100644 index 0000000..6c3db62 --- /dev/null +++ b/net-mgmt/net-snmp-devel/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 diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile index 5d5d68f..0e76f72 100644 --- a/net-mgmt/net-snmp/Makefile +++ b/net-mgmt/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-mgmt/net-snmp/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp/files/patch-snmpTCPIPv6Domain.c new file mode 100644 index 0000000..fcfc1e6 --- /dev/null +++ b/net-mgmt/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-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp/files/patch-snmpUCDIPv6Domain.c new file mode 100644 index 0000000..33b240f --- /dev/null +++ b/net-mgmt/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-mgmt/net-snmp/files/patch-snmpd.1.def b/net-mgmt/net-snmp/files/patch-snmpd.1.def new file mode 100644 index 0000000..6c3db62 --- /dev/null +++ b/net-mgmt/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 diff --git a/net-mgmt/net-snmp53/Makefile b/net-mgmt/net-snmp53/Makefile index 5d5d68f..0e76f72 100644 --- a/net-mgmt/net-snmp53/Makefile +++ b/net-mgmt/net-snmp53/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-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp53/files/patch-snmpTCPIPv6Domain.c new file mode 100644 index 0000000..fcfc1e6 --- /dev/null +++ b/net-mgmt/net-snmp53/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-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp53/files/patch-snmpUCDIPv6Domain.c new file mode 100644 index 0000000..33b240f --- /dev/null +++ b/net-mgmt/net-snmp53/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-mgmt/net-snmp53/files/patch-snmpd.1.def b/net-mgmt/net-snmp53/files/patch-snmpd.1.def new file mode 100644 index 0000000..6c3db62 --- /dev/null +++ b/net-mgmt/net-snmp53/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 |