diff options
author | rrs <rrs@FreeBSD.org> | 2009-04-11 10:08:26 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2009-04-11 10:08:26 +0000 |
commit | acb28274ec5924b92d55cc82deafdb25e83d4c33 (patch) | |
tree | 6cdf13bb4667bb102b0ecc5f5d65000c2e743848 /sbin | |
parent | 7ba2ea0371b556e3441456dc7a95b7a897b26249 (diff) | |
download | FreeBSD-src-acb28274ec5924b92d55cc82deafdb25e83d4c33.zip FreeBSD-src-acb28274ec5924b92d55cc82deafdb25e83d4c33.tar.gz |
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)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 2962e00..1b0985e 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -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; |