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:
Randall Stewart 2009-04-11 10:08:26 +00:00
parent ab5378cf11
commit 5412227e19

View File

@ -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;