subnet4_to_prefixlen() should use ntohl().
This commit is contained in:
parent
b6444fa806
commit
3af0a7824d
@ -103,7 +103,7 @@ static int trailz(uint32_t v)
|
||||
// sn must be in network order
|
||||
static inline int subnet4_to_prefixlen(uint32_t sn)
|
||||
{
|
||||
return 32 - trailz(sn);
|
||||
return 32 - trailz(ntohl(sn));
|
||||
}
|
||||
|
||||
// str_bcast is optional.
|
||||
|
Loading…
Reference in New Issue
Block a user