Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Mar 2013 15:03:34 +0100
From:      Andre Oppermann <andre@freebsd.org>
To:        "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Cc:        net@freebsd.org
Subject:   Re: [patch] interface routes
Message-ID:  <51389E36.3020104@freebsd.org>
In-Reply-To: <51389C29.8000407@FreeBSD.org>
References:  <513834E4.7050203@FreeBSD.org> <51384443.5070209@freebsd.org> <51387D4A.9030408@FreeBSD.org> <51388046.7040408@freebsd.org> <51389C29.8000407@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07.03.2013 14:54, Alexander V. Chernikov wrote:
> On 07.03.2013 15:55, Andre Oppermann wrote:
>> On 07.03.2013 12:43, Alexander V. Chernikov wrote:
>>> On 07.03.2013 11:39, Andre Oppermann wrote:
>>>> This brings up a long standing sore point of our routing code
>>>> which this patch makes more pronounced.  When an interface link
>>>> state is down I don't want the route to it to persist but to
>>>> become inactive so another path can be chosen.  This the very
>>>> point of running a routing daemon.  So on the link-down event
>>>> the installed interface routes should be removed from the routing
>>>> table.  The configured addresses though should persist and the
>>>> interface routes re-installed on a link-up event.  What's your
>>>> opinion on it?
>>>
>>> This is exactly what is done in current code for IPv4:
>>> if_down calls if_unroute(), it cals prctlinput() for every interface
>>> address, and domain-dependent function like rip_ctlinput calls
>>> in_ifscrub() cleaning given interface route.
>>> However, address route (/32) still remains (but route daemons, at least
>>> bird, tends to ignore it since it is not listed as valid interface
>>> address/mask).
>>
>> IF_DOWN and link state down are not the same thing.  When the cable
>> is unplugged the link state goes down but not the interface.
 >
> Ups. I've missed 'link' keyword.
> Imho 'operational down' should behave exactly the same as 'admin down'
> e.g. delete interface routes from route table.
> It should be not very hard to do.

Are you to implement it after the pinning patch? ;-)

-- 
Andre




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51389E36.3020104>