From owner-freebsd-net@FreeBSD.ORG Sat Mar 9 19:20:23 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C8813F6D; Sat, 9 Mar 2013 19:20:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0C0701; Sat, 9 Mar 2013 19:20:23 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1UEPN0-00092D-Td; Sat, 09 Mar 2013 23:23:51 +0400 Message-ID: <513B8B56.1000005@FreeBSD.org> Date: Sat, 09 Mar 2013 23:19:50 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Nikolay Denev Subject: Re: [patch] interface routes References: <513834E4.7050203@FreeBSD.org> <51384443.5070209@freebsd.org> <20130307214205.GD50035@funkthat.com> <5205A02F-E886-4B7E-8494-1D92F930933B@gmail.com> In-Reply-To: <5205A02F-E886-4B7E-8494-1D92F930933B@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: John-Mark Gurney , Andre Oppermann , net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 19:20:23 -0000 On 09.03.2013 23:17, Nikolay Denev wrote: > On Mar 7, 2013, at 9:42 PM, 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... >> >> -- >> John-Mark Gurney Voice: +1 415 225 5579 >> >> "All that I will do, has been done, All that I have, has not." > > Maybe this can be made a option that can be turned on when needed. Yes. There is another patch in this thread with "remove_iface_routes_on_change" per-VNET sysctl, turned off by default. > What you describe can be very undesirable for a workstation/laptop or a server, > but a router that itself does not have many connections originating or terminating on it could > actually benefit from this. > The current state is actually much worse for routers. A link down does not do anything, and > while there may be a alternative route to be installed for example from OSPF, the interface without link > pertains its routes and effectively blackholes all traffic. > > -- > Nikolay > >