Date: Sat, 11 Apr 2009 08:50:02 GMT From: Mykola Dzham <freebsd@levsha.org.ua> To: freebsd-net@FreeBSD.org Subject: Re: bin/131365: r190758 break using 0 , 0/0, 0.0.0.0/0 as alias for 'default' Message-ID: <200904110850.n3B8o2ka010510@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/131365; it has been noted by GNATS.
From: Mykola Dzham <freebsd@levsha.org.ua>
To: bug-followup@FreeBSD.org, rrs@FreeBSD.org
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: levsha@jabber.net.ua
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904110850.n3B8o2ka010510>
