The following reply was made to PR bin/131365; it has been noted by GNATS.
From: Mykola Dzham <[email protected]>
To: [email protected], [email protected]
Cc:
Subject: Re: bin/131365: r190758 break using 0 , 0/0, 0.0.0.0/0 as alias
for 'default'
Date: Sat, 11 Apr 2009 11:20:20 +0300
--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi!
r190758 break using 0.0.0.0/0 as alias for default rote:
$ route -n get default
route to: default
destination: default
mask: default
gateway: 192.168.1.1
interface: em0
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
$ route -n get -net 0.0.0.0
route: writing to routing socket: No such process
Attached patch fix this
--
Mykola Dzham, LEFT-(UANIC|RIPE)
JID: [email protected]
--UugvWAfsgieZRqgk
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="route.c.patch"
Index: route.c
===================================================================
--- route.c (revision 190880)
+++ route.c (working copy)
@@ -818,7 +818,8 @@
/* 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;
--UugvWAfsgieZRqgk--
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"