Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jul 2005 23:46:00 +0900
From:      gnn@freebsd.org
To:        freebsd-net@freebsd.org
Subject:   A bit of a route socket bug...
Message-ID:  <m2slysgfh3.wl%gnn@neville-neil.com>

next in thread | raw e-mail | index | archive | help
Howdy,

As was reported in
http://www.freebsd.org/cgi/query-pr.cgi?pr=%0D%0A82974

if you do 

route change 10.3.2.1 127.0.0.1

on a system with a default route but no route on the 10 network at
all, you wind up setting the default route to 127.0.0.1 which is
rarely what you want.  This is due to the fact that in rtsock.c around
line 431 (in CURRENT) we do a rnh_lookup but don't make sure that the
route we looked up was the one we sought.  The radix code correctly
finds the most useful route to 10.3.2.1, i.e the default route, and
the dutifully hoses it.

The question is, "What's the right fix here?"  Right now I'm too tired
to figure it out, so I figure in the 8 hours I'm asleep someone else
might come up with a patch :-)

Later,
George




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2slysgfh3.wl%gnn>