Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
tcpd
tcp_wrappers_7.6-ipv6-mapped-v4.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tcp_wrappers_7.6-ipv6-mapped-v4.patch of Package tcpd
--- hosts_access.c | 2 +- socket.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) Index: tcp_wrappers_7.6/hosts_access.c =================================================================== --- tcp_wrappers_7.6.orig/hosts_access.c +++ tcp_wrappers_7.6/hosts_access.c @@ -461,7 +461,7 @@ char *string; } return ((addr & mask) == net); } - + /* string_match - match string against pattern * * tok = data read from /etc/hosts.* Index: tcp_wrappers_7.6/socket.c =================================================================== --- tcp_wrappers_7.6.orig/socket.c +++ tcp_wrappers_7.6/socket.c @@ -187,24 +187,28 @@ struct host_info *host; #ifdef INET6 struct sockaddr *sin = (struct sockaddr *) host->sin; char *ap; - int alen; + int af; if (!sin) return; - switch (sin->sa_family) { + + af = sin->sa_family; + switch (af) { case AF_INET: ap = (char *)&((struct sockaddr_in *)sin)->sin_addr; - alen = sizeof(struct in_addr); break; case AF_INET6: ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr; - alen = sizeof(struct in6_addr); + if (IN6_IS_ADDR_V4MAPPED(ap)) { + ap = &((struct in6_addr *) ap)->s6_addr32[3]; + af = AF_INET; + } break; default: return; } host->addr[0] = '\0'; - inet_ntop(sin->sa_family, ap, host->addr, sizeof(host->addr)); + inet_ntop(af, ap, host->addr, sizeof(host->addr)); #else struct sockaddr_in *sin = host->sin;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor