From owner-freebsd-net@FreeBSD.ORG Wed Aug 21 16:50:06 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9E8075A8 for ; Wed, 21 Aug 2013 16:50:06 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 099C22933 for ; Wed, 21 Aug 2013 16:50:05 +0000 (UTC) Received: (qmail 73134 invoked from network); 21 Aug 2013 17:33:09 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 21 Aug 2013 17:33:09 -0000 Message-ID: <5214EFB7.7020708@freebsd.org> Date: Wed, 21 Aug 2013 18:49:59 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Will Andrews Subject: Re: CFR: FIB handling improvements References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, "Justin T. Gibbs" , Alan Somers 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: Wed, 21 Aug 2013 16:50:06 -0000 On 21.08.2013 17:42, Will Andrews wrote: > Hi, > > I'm working to port forward to FreeBSD/head, improvements made to FIB > handling by my colleagues Alan Somers and Justin Gibbs. > > Please review: http://people.freebsd.org/~will/fix-fib-issues.1.diff > > This patch includes fixes for several issues relating to FIBs: > > * Use of dhclient with non-zero FIBs. With this patch, it is possible > to use DHCP on a specific interface with a non-zero FIB and have it > work correctly with this rc.conf snippet: > > ifconfig_em1="SYNCDHCP" > dhclient_fib_em1=1 > > This part of the patch includes a XXX, because I am not sure whether > the dhclient rc.d script should manually set the FIB on the given > interface, or if it should be inferred via some other mechanism. > > * Always add loopback routes for non-zero FIBs, for both IPv4 and > IPv6. Arguably, this could be a policy issue, but it is currently > less-than-trivial to specify (in rc.conf) that a route needs to be > applied to every FIB. > > * Having two or more FIBs whose interfaces share the same prefix and > netmask. This involves adding fibnum arguments to ifa_ifwithnet() and > ifa_ifwithdstaddr(), and checking it within. > > * Setting the FIB on a network interface. rtinit1() looks it up via > the current process context, so we must be calling setfib(2) from > within ifconfig. > > * Creating & deleting loopback routes now works correctly for > non-default FIBs, by using the interface's FIB instead of always 0. > > Commits would be made on each of these issues separately, but since > they are all related, I thought it would be easier for others to > evaluate them with context. Fine with me and no objections. -- Andre