mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Fix broken case where caused by last patch where
a user uses 0.0.0.0/0 as an alias for default. Obtained from: Mykola Dzham (freebsd@levsha.org.ua)
This commit is contained in:
parent
ab5378cf11
commit
5412227e19
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190913
|
@ -818,7 +818,8 @@ inet_makenetandmask(net, sin, bits)
|
|||
/* i holds the first non zero bit */
|
||||
bits = 32 - (i*8);
|
||||
}
|
||||
mask = 0xffffffff << (32 - bits);
|
||||
if (bits != 0)
|
||||
mask = 0xffffffff << (32 - bits);
|
||||
|
||||
sin->sin_addr.s_addr = htonl(addr);
|
||||
sin = &so_mask.sin;
|
||||
|
|
Loading…
Reference in a new issue