Subject: Kernel stack overflow after playing with routes
To: None <current-users@netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 08/19/2002 02:13:39
On NetBSD 1.6_BETA2/vax, I was playing with weird routes (things like
    route add default 192.168.0.1 -ifp le0
and 
    route add -net 192.168.0.0 -netmask 0xffffff00 -ifp le0 -cloning 192.168.0.1 -interface)

and at some point, when pinging, I got a kernel stack overflow and
dropped in ddb. A traceback revealed an infinite recursion in routing
functions. Unfortunately I didn't write it down, hoping to recreate the
situation whilst documenting precisely what I was doing. Of course this
did not happen.

Has anybody else seen something like this?

Aside: in the second command, there is a logically unnecessary gateway
present. I didn't want it there but without it I get EINVAL
(sys/net/rtsock.c, route_output, case RTM_ADD). Adding the "-interface"
option cancels effectively cancels it. I just want to route all packets
for that network out of de0, even though it does not have a
corresponding address inside that network (the destination has one,
however). (don't ask me why I want that :-)

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@       -- Woe betide the one who feels
\X/ polderland.nl  -- remorse without sin - Tom Poes, "Het boze oog", 4444.