Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
tcpd
tcp_wrappers_7.6-ipv6.fix.fix.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tcp_wrappers_7.6-ipv6.fix.fix.diff of Package tcpd
--- hosts_access.c.orig +++ hosts_access.c @@ -354,7 +354,26 @@ char *string; /* If prefix was given, handle it */ if ((mask = split_at(token, '/')) != 0) { - if (sscanf(mask, "%d", &prefixlen) != 1 || prefixlen < 0) + if (strchr(mask, '.') != NULL) /* We have something + like 255.255.0.0 */ + { + int b1, b2, b3, b4; + uint32_t netmask; + + if (sscanf(mask, "%d.%d.%d.%d", &b1, &b2, &b3, &b4) != 4) + { + tcpd_warn ("Wrong netmask in %s", tok); + return (NO); + } + netmask = (((((b1 * 256) + b2) * 256) + b3) * 256) + b4; + prefixlen = 0; + while (netmask > 0) + { + ++prefixlen; + netmask <<= 1; + } + } + else if (sscanf(mask, "%d", &prefixlen) != 1 || prefixlen < 0) { tcpd_warn ("Wrong prefix length in %s", tok); return (NO);
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