fix the tcp_wrappers-7.6-altformat.patch (#979009)
This commit is contained in:
parent
1e1e8d9ec5
commit
d2dfa56a0a
|
@ -1,30 +1,27 @@
|
|||
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;
|
||||
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat 2013-07-09 10:27:20.796653076 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-07-09 14:11:52.014295459 +0200
|
||||
@@ -331,11 +331,16 @@ struct host_info *host;
|
||||
if ((cbr = strchr(tok, ']')))
|
||||
*cbr = '\0';
|
||||
|
||||
+ if (cbr == NULL) {
|
||||
+ tcpd_warn("bad IP6 address specification");
|
||||
+ return (NO);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* A /nnn prefix specifies how many bits of the address we
|
||||
- * need to check.
|
||||
+ * 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
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat 2013-07-09 10:27:20.793653089 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-07-09 10:27:20.798653068 +0200
|
||||
@@ -434,6 +434,9 @@ char *pat;
|
||||
int err = 0;
|
||||
int mask = IPV6_ABITS;
|
||||
|
|
Loading…
Reference in New Issue