diff options
author | hrs <hrs@FreeBSD.org> | 2012-02-04 17:53:22 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2012-02-04 17:53:22 +0000 |
commit | 0f7ce0eaaf7a2db2a9bcf8b482de0d5fc607ac3d (patch) | |
tree | 40b2cd97fdcde56d28c14c95f442d645f47143e8 /sbin | |
parent | d657a808e177a73e0f680643e066f3ca02c98da1 (diff) | |
download | FreeBSD-src-0f7ce0eaaf7a2db2a9bcf8b482de0d5fc607ac3d.zip FreeBSD-src-0f7ce0eaaf7a2db2a9bcf8b482de0d5fc607ac3d.tar.gz |
Fix a possible infinite loop in "route flush" on 64-bit archs.
MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 4b2f16e..717a09a 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -460,8 +460,8 @@ netname(struct sockaddr *sa) * Guess at the subnet mask, assuming reasonable * width subnet fields. */ - while (in.s_addr &~ mask) - mask = (long)mask >> subnetshift; + while (in.s_addr & ~mask) + mask |= mask >> subnetshift; net = in.s_addr & mask; while ((mask & 1) == 0) mask >>= 1, net >>= 1; |