[Top] [All Lists]

Re: static routes and dead gateway detection

To: ja@xxxxxx (Julian Anastasov)
Subject: Re: static routes and dead gateway detection
From: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Date: Mon, 23 Jul 2001 01:15:39 +0400 (MSD)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.10.10106271308530.11529-100000@l> from "Julian Anastasov" at Jun 27, 1 03:03:52 pm
Sender: owner-netdev@xxxxxxxxxxx

>       In the current kernels I see that all routes are deleted when
> a device goes down (!IFF_UP -> NETDEV_DOWN).


>                                                I can't find a place
> where the proto static routes are used.

proto is not used by kernel (except for marking routes created
by itself with proto "kernel"), it is used by routing daemons,
namely, gated.

> So, I implemented a way to make the proto static routes permanent.

Not so bad idea. Only pretty useless one, gated and brothers do this nicely.

Implementation is wrong, but you will get this effect using code under
#ifdef CONFIG_IP_ROUTE_MULTIPATH for normal routes.

> kernel(s). It is for 2.2 and can be ported to 2.4 too. How these RTPROT
> codes are really used in the routing daemons and do they use static
> routes too?

Look into gated manual, it explains diffrence of routes with

>       What I see as problem even in the plain 2.2.19 kernel is that
> when one device for one of the nexthops (when the prefsrc is not from
> this device) is removed and 

Sorry, you did something wrong here. On unregister you must destroy all the
references to this device. Being unregistered, the device disappears
forever and cannot return.

> added again it can receive another dev index

Full non-sense. "This" device cannot get another index, index
is the only thing distinguishing devices.  

> The patch contains a fix in fib_sync_up() about similar problem, i.e.
> not to touch nh_dev for DEAD routes.

Do not leave undefined crap there, that's answer. :-)


<Prev in Thread] Current Thread [Next in Thread>