Remove wrong checks.
This commit is contained in:
parent
636200d1a2
commit
26a228e302
1 changed files with 0 additions and 6 deletions
|
@ -219,9 +219,6 @@ bool str2net(subnet_t *subnet, const char *subnetstr)
|
|||
}
|
||||
|
||||
if(sscanf(subnetstr, "%hu.%hu.%hu.%hu", &x[0], &x[1], &x[2], &x[3]) == 4) {
|
||||
if(l < 0 || l > 32)
|
||||
return false;
|
||||
|
||||
subnet->type = SUBNET_IPV4;
|
||||
subnet->net.ipv4.prefixlength = 32;
|
||||
|
||||
|
@ -236,9 +233,6 @@ bool str2net(subnet_t *subnet, const char *subnetstr)
|
|||
|
||||
if(sscanf(subnetstr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx",
|
||||
&x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &x[6], &x[7]) == 8) {
|
||||
if(l < 0 || l > 128)
|
||||
return false;
|
||||
|
||||
subnet->type = SUBNET_IPV6;
|
||||
subnet->net.ipv6.prefixlength = 128;
|
||||
|
||||
|
|
Loading…
Reference in a new issue