From nobody@FreeBSD.org  Tue Mar 18 15:41:33 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 014C35C8
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2014 15:41:33 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id E209328F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2014 15:41:32 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2IFfWXA009074
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Mar 2014 15:41:32 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2IFfWpB009070;
	Tue, 18 Mar 2014 15:41:32 GMT
	(envelope-from nobody)
Message-Id: <201403181541.s2IFfWpB009070@cgiserv.freebsd.org>
Date: Tue, 18 Mar 2014 15:41:32 GMT
From: Alan Somers <asomers@freebsd.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Nondefault FIBs don't get  loopback addresses
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         187699
>Category:       bin
>Synopsis:       [libc] Nondefault FIBs don't get loopback addresses
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    asomers
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 18 15:50:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Apr 20 22:09:43 UTC 2014
>Originator:     Alan Somers
>Release:        11.0 CURRENT
>Organization:
Spectra Logic
>Environment:
FreeBSD alans-fbsd-head 11.0-CURRENT FreeBSD 11.0-CURRENT #40 r263266: Mon Mar 17 13:07:35 MDT 2014     alans@ns1.eng.sldomain.com:/vmpool/obj/usr/home/alans/freebsd/head/sys/GENERIC  amd64
>Description:
"ping 127.0.0.1" and "ping6 ::1" should always work, regardless of which
FIB is in use.  However, they don't.  ipv4_up() in network.subr ensures
adds the 127.0.0.1 address to lo0 in the default fib, which causes the
kernel to add it to the default fib's routing table.  But nothing adds
that address to alternate fibs.  Nor does anything add ::1 to the inet6
routing tables for alternate FIBs.

IMHO, the best way to solve this bug would be to add 127.0.0.1 and ::1
static routes in /etc/rc.d/routing in the functions static_inet() and
static_inet6().
>How-To-Repeat:
In /boot/loader.conf.local:
net.fibs="4"
net.add_addr_allfibs="0"

setfib 1 ping localhost    # This will fail, but it should succeed
setfib 1 ping6 ::1         # This will fail, but it should succeed.
>Fix:
Working on a patch now ...

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->asomers 
Responsible-Changed-By: asomers 
Responsible-Changed-When: Tue Mar 18 16:08:15 UTC 2014 
Responsible-Changed-Why:  
I'll take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187699 
>Unformatted:
