mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:39:59 -04:00
[master] Fix a minor bug in isc_netaddr_masktoprefixlen
(cherry picked from commit f78603b534)
This commit is contained in:
parent
62b4b99d0e
commit
f8e3534f18
2 changed files with 1 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ isc_result_t
|
|||
isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp);
|
||||
/*%<
|
||||
* Convert a netmask in 's' into a prefix length in '*lenp'.
|
||||
* The mask should consist of zero or more '1' bits in the most
|
||||
* The mask should consist of zero or more '1' bits in the
|
||||
* most significant part of the address, followed by '0' bits.
|
||||
* If this is not the case, #ISC_R_MASKNONCONTIG is returned.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
|
|||
for (; i < ipbytes; i++) {
|
||||
if (p[i] != 0)
|
||||
return (ISC_R_MASKNONCONTIG);
|
||||
i++;
|
||||
}
|
||||
*lenp = nbytes * 8 + nbits;
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue