From OpenBSD:
always widen the imputed netmask if it is narrower than the specified octets. fixes a strange behaviour where inet_net_pton would always return 4 (bits) for multicast addresses no matter how many octets were specified. negotiated with Paul Vixie, original author of this function. PR: standards/53151 Submitted by: Max Laier <max@love2party.net> Optained from: OpenBSD
This commit is contained in:
parent
67193a54f0
commit
2b9de089a7
@ -186,7 +186,7 @@ inet_net_pton_ipv4(src, dst, size)
|
||||
else /* Class A */
|
||||
bits = 8;
|
||||
/* If imputed mask is narrower than specified octets, widen. */
|
||||
if (bits >= 8 && bits < ((dst - odst) * 8))
|
||||
if (bits < ((dst - odst) * 8))
|
||||
bits = (dst - odst) * 8;
|
||||
}
|
||||
/* Extend network to cover the actual mask. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user