2013-01-28 12:51:32 +00:00
|
|
|
diff -up tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat tcp_wrappers_7.6-ipv6.4/hosts_access.c
|
2013-08-15 16:42:16 +00:00
|
|
|
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat 2013-08-15 18:46:30.398827866 +0200
|
|
|
|
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-08-15 18:50:03.099748732 +0200
|
|
|
|
@@ -326,11 +326,15 @@ struct host_info *host;
|
|
|
|
if (cbr = strchr(tok, ']'))
|
2013-07-09 16:14:40 +00:00
|
|
|
*cbr = '\0';
|
2013-01-28 12:51:32 +00:00
|
|
|
|
2013-07-09 16:14:40 +00:00
|
|
|
+ if (cbr == NULL) {
|
|
|
|
+ tcpd_warn("bad IP6 address specification");
|
|
|
|
+ return (NO);
|
|
|
|
+ }
|
2013-01-28 12:51:32 +00:00
|
|
|
/*
|
|
|
|
* A /nnn prefix specifies how many bits of the address we
|
2013-07-09 16:14:40 +00:00
|
|
|
* need to check.
|
2013-01-28 12:51:32 +00:00
|
|
|
*/
|
2013-08-15 16:42:16 +00:00
|
|
|
- if (slash = strchr(tok, '/')) {
|
2013-01-28 12:51:32 +00:00
|
|
|
+ if ((slash = strchr(tok, '/')) || (slash = strchr(cbr+1, '/'))) {
|
|
|
|
*slash = '\0';
|
|
|
|
mask = atoi(slash+1);
|
|
|
|
if (mask < 0 || mask > IPV6_ABITS) {
|
|
|
|
diff -up tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat tcp_wrappers_7.6-ipv6.4/tcpdchk.c
|
2013-08-15 16:42:16 +00:00
|
|
|
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat 1999-10-28 08:38:06.000000000 +0200
|
|
|
|
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-08-15 18:46:30.399827870 +0200
|
|
|
|
@@ -430,6 +430,9 @@ char *pat;
|
2013-01-28 12:51:32 +00:00
|
|
|
int err = 0;
|
|
|
|
int mask = IPV6_ABITS;
|
|
|
|
|
|
|
|
+ if (!slash)
|
|
|
|
+ slash = strchr(cbr+1, '/');
|
|
|
|
+
|
|
|
|
if (slash != NULL) {
|
|
|
|
*slash = '\0';
|
|
|
|
mask = atoi(slash + 1);
|