Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 1997 23:06:35 +0100
From:      j@uriah.heep.sax.de (J Wunsch)
To:        mrcpu@cdsnet.net (Jaye Mathisen)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Route command breakage
Message-ID:  <Mutt.19970116230635.j@uriah.heep.sax.de>
In-Reply-To: <Pine.NEB.3.95.970115164848.23098A-100000@mail.cdsnet.net>; from Jaye Mathisen on Jan 15, 1997 16:49:55 -0800
References:  <Pine.NEB.3.95.970115164848.23098A-100000@mail.cdsnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
As Jaye Mathisen wrote:

> I mis-typed the following command:
> 
> # route add 204.118.245.0 255.255.255.0 204.118.244.252
> add net 204.118.245.0: gateway 255.255.255.0

> 204.118.244&0xcc76f4fc 255.255.255.0      UGSc        0        0       de0
> =>

> Something is broke.

Yes, definately -- but only your netmask. :-)

(gdb) p/x (204<<24)+(118<<16)+(244<<8)+252
$1 = 0xcc76f4fc

So very simple: the route command took the third argument as a
(non-contiguous) netmask.  netstat -r tries to print /masklen if the
netmask is contiguous, but simply falls back to &mask if it is not.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970116230635.j>