Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147923260
D40070.1784800126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
886 B
Referenced Files
None
Subscribers
None
D40070.1784800126.diff
View Options
diff --git a/contrib/tcp_wrappers/hosts_access.c b/contrib/tcp_wrappers/hosts_access.c
--- a/contrib/tcp_wrappers/hosts_access.c
+++ b/contrib/tcp_wrappers/hosts_access.c
@@ -315,7 +315,8 @@
return (masked_match(tok, mask, eval_hostaddr(host)));
} else { /* anything else */
return (string_match(tok, eval_hostaddr(host))
- || (NOT_INADDR(tok) && string_match(tok, eval_hostname(host))));
+ || (NOT_INADDR(tok) && NOT_INADDR6(tok)
+ && string_match(tok, eval_hostname(host))));
}
}
diff --git a/contrib/tcp_wrappers/tcpd.h b/contrib/tcp_wrappers/tcpd.h
--- a/contrib/tcp_wrappers/tcpd.h
+++ b/contrib/tcp_wrappers/tcpd.h
@@ -70,6 +70,7 @@
#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid))
#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0)
+#define NOT_INADDR6(s) (strchr(s, ':') == NULL)
/* Global functions. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 9:48 AM (14 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29237731
Default Alt Text
D40070.1784800126.diff (886 B)
Attached To
Mode
D40070: tcp_wrappers: recognize IPv6 addresses/prefixes
Attached
Detach File
Event Timeline
Log In to Comment