From owner-freebsd-net@freebsd.org Thu Jan 18 00:31:15 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FC06EC2A1C for ; Thu, 18 Jan 2018 00:31:15 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F1C496B061 for ; Thu, 18 Jan 2018 00:31:14 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F25A425D3860; Thu, 18 Jan 2018 00:31:05 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 4578AD1F827; Thu, 18 Jan 2018 00:31:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 8xC8yfY3efpV; Thu, 18 Jan 2018 00:31:03 +0000 (UTC) Received: from [192.168.2.110] (unknown [IPv6:fde9:577b:c1a9:31:2ef0:eeff:fe03:ee34]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 2616CD1F826; Thu, 18 Jan 2018 00:31:02 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Rodney W. Grimes" Cc: "Ryan Stone" , freebsd-net Subject: Re: Allowing a local subnet route to change to a different ifnet Date: Thu, 18 Jan 2018 00:31:03 +0000 X-Mailer: MailMate (2.0BETAr6103) Message-ID: In-Reply-To: <201801180009.w0I09vD7065398@pdx.rh.CN85.dnsmgr.net> References: <201801180009.w0I09vD7065398@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 00:31:15 -0000 On 18 Jan 2018, at 0:09, Rodney W. Grimes wrote: >> I have a customer that has configured two different IPs on the same >> subnet on two different interfaces. The behaviour that they want is >> that if the link on one of the two interfaces goes down, the route to >> that subnet will migrate to the other IP on the other interface as a >> quasi-failover behaviour. Under FreeBSD 7, we had a daemon that >> accomplished this by detecting the link loss and then using "route >> change" to move the route to the up interface. If the subnet in >> question was 192.168.1.0/24, for example, we could run "route change >> 192.1.68.1.0/24 -ifp em1" to migrate the route. > > "route change 192.1.68.1.0/24 -ifp em1" does not appear to be > valid syntax to me, -ifp is not a route option? > Did you mean -interface? The proper syntax should be route change -ifp but that’s not the issue (the other syntax works or used to work but not according to specification). >> Running on -head I run into two issues. The first comes out of >> r264986, which changes the behaviour of RTM_CHANGE. The code path >> changed significantly, but the part that impacts me is that now any >> RTM_CHANGE command with the gateway set NULL gets EINVAL immediately >> where previously it was allowed. I've hacked around this problem >> locally for testing purposes but I really don't understand the code >> well enough at this point to see what a real fix would look like. Running route -n monitor & while doing the change I get very weird results (without your patch). [ignore the patch for the moment] >> My first, and most important question, is whether a patch that would >> allow a subnet route to be migrated to a different interface be >> something that would be acceptable in FreeBSD? Yes. >> If so, I need guidance >> on what a proper fix for both issues would look like so that I can >> implement fixes that I can upstream. > > From a fundemental standpoint this should work, > that it is now broken is a regression that needs fixed. +1 /bz