[patch] interface routes

Alexander V. Chernikov melifaro at FreeBSD.org
Fri Mar 8 15:32:10 UTC 2013


On 08.03.2013 01:42, John-Mark Gurney wrote:
> Andre Oppermann wrote this message on Thu, Mar 07, 2013 at 08:39 +0100:
>>> Adding interface address is handled via atomically deleting old prefix and
>>> adding interface one.
>>
>> 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?
>>
>> Other than these points I think your code is fine and can go
>> into the tree.
>
> The issue that I see with this is that if you bump your cable, all
> your connections will be dropped, because as soon as they try to send
> something, they'll get a no route to host, and this will break the
> TCP connection...  If we keep the routes when the link goes down,
> the packet will be queued or dropped (depending upon ethernet driver),
> but the TCP connection will not break...
Yes. Older one using if_start with OS queue should queue traffic, while 
if_transmit ones probably drop it.

So this behavior should be configurable depending on OS role.

Patch attached. Other issues like carp, IPv6 or similar can arise, so 
this definitely deserves wider discussion.

>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: remove_iface_routes.diff
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20130308/d0afa112/attachment.ksh>


More information about the freebsd-net mailing list