netdev
[Top] [All Lists]

Re: static routes and dead gateway detection

To: <kuznet@xxxxxxxxxxxxx>
Subject: Re: static routes and dead gateway detection
From: Julian Anastasov <ja@xxxxxx>
Date: Tue, 24 Jul 2001 23:01:20 +0000 (GMT)
Cc: <netdev@xxxxxxxxxxx>
In-reply-to: <200107241743.VAA29796@ms2.inr.ac.ru>
Sender: owner-netdev@xxxxxxxxxxx
        Hello Alexey,

On Tue, 24 Jul 2001 kuznet@xxxxxxxxxxxxx wrote:

> Hello!
>
> > But with such patch the kernel becomes a nice healthchecking daemon :))
>
> Moving gated to kernel is not a nice idea.

        Agreed. The patch size is different, though :)

> >     In this patch the dead gateways are flushed exactly at the same
> > time when all other (non-static) dead routes are flushed, i.e. when the
> > device is removed (fib_num_down_nh_devs, sorry for the bad func name, it is
> > incorrect, may be the comments too). This ugly function tries to
> > distinguish whether a prefsrc was deleted or the device was marked down.
> > We try to preserve the dead routes only when the device is marked down.
> > And not only for multipath routes.
>
> fib_sync_down() makes exactly the same thing. Just remove check
> for multipath, uncomment fib_sync_up() and live in peace.

        Hm, I can't understand this trick. fib_flush always follows
fib_sync_down (where the DEAD flag is correctly set). But fib_flush
makes its decisions based on the same flag (fn_flush_list). I can't
see how fib_sync_up will detect such routes, they are already flushed.
The patch only adds checks in fn_flush_list, I don't see another
solution, for now. It seems only in fn_flush_list the dead routes
can be preserved if they are marked as result of device state change.

> > about nh_ifname or similar solution. Then the new device can replace the
> > old one, by name.
>
> "name" is not something distinguishing devices. Index is.

        I understand, I only note that similar trick works for
ip rules :) I understand also that the implementation for routes (if
reasonable) can lead to big changes ...

> Alexey


Regards

--
Julian Anastasov <ja@xxxxxx>


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