38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
|
diff -up tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat tcp_wrappers_7.6-ipv6.4/hosts_access.c
|
||
|
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat 2013-01-28 13:22:09.986535601 +0100
|
||
|
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-01-28 13:42:12.142650817 +0100
|
||
|
@@ -333,9 +333,9 @@ struct host_info *host;
|
||
|
|
||
|
/*
|
||
|
* A /nnn prefix specifies how many bits of the address we
|
||
|
- * need to check.
|
||
|
+ * need to check.
|
||
|
*/
|
||
|
- if ((slash = strchr(tok, '/'))) {
|
||
|
+ if ((slash = strchr(tok, '/')) || (slash = strchr(cbr+1, '/'))) {
|
||
|
*slash = '\0';
|
||
|
mask = atoi(slash+1);
|
||
|
if (mask < 0 || mask > IPV6_ABITS) {
|
||
|
@@ -349,6 +349,8 @@ struct host_info *host;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ printf("IPv6 addr/mask: %s/%s\n", tok+1, slash+1);
|
||
|
+
|
||
|
if (cbr == NULL || inet_pton(AF_INET6, tok+1, &in6) != 1) {
|
||
|
tcpd_warn("bad IP6 address specification");
|
||
|
return (NO);
|
||
|
diff -up tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat tcp_wrappers_7.6-ipv6.4/tcpdchk.c
|
||
|
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat 2013-01-28 13:44:44.786549981 +0100
|
||
|
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-01-28 13:44:58.419629764 +0100
|
||
|
@@ -434,6 +434,9 @@ char *pat;
|
||
|
int err = 0;
|
||
|
int mask = IPV6_ABITS;
|
||
|
|
||
|
+ if (!slash)
|
||
|
+ slash = strchr(cbr+1, '/');
|
||
|
+
|
||
|
if (slash != NULL) {
|
||
|
*slash = '\0';
|
||
|
mask = atoi(slash + 1);
|