summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.c
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2014-06-06 21:45:14 +0000
committerasomers <asomers@FreeBSD.org>2014-06-06 21:45:14 +0000
commit322a1ee4a01630c2c5cb0ecfd4cb5b7aabe46793 (patch)
tree14298f8dc6491de3d34d500b9b3f6e24bfc4b814 /sys/netinet/in.c
parenta8aa481895641687bc168b6283d7521e52a48280 (diff)
downloadFreeBSD-src-322a1ee4a01630c2c5cb0ecfd4cb5b7aabe46793.zip
FreeBSD-src-322a1ee4a01630c2c5cb0ecfd4cb5b7aabe46793.tar.gz
MFC r264887
Fix host and network routes for new interfaces when net.add_addr_allfibs=0 sys/net/route.c In rtinit1, use the interface fib instead of the process fib. The latter wasn't very useful because ifconfig(8) is usually invoked with the default process fib. Changing ifconfig(8) to use setfib(2) would be redundant, because it already sets the interface fib. tests/sys/netinet/fibs_test.sh Clear the expected ATF failure sys/net/if.c Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib sys/netinet/in.c sys/net/if_var.h Add a fibnum argument to ifa_switch_loopback_route, a subroutine of in_scrubprefix. Pass it the interface fib.
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r--sys/netinet/in.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 1f07542..13cce0f 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1007,10 +1007,12 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags)
(target->ia_flags & IFA_RTSELF)) {
struct route ia_ro;
int freeit = 0;
+ int fib;
bzero(&ia_ro, sizeof(ia_ro));
*((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr;
- rtalloc_ign_fib(&ia_ro, 0, 0);
+ fib = target->ia_ifa.ifa_ifp->if_fib;
+ rtalloc_ign_fib(&ia_ro, 0, fib);
if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) &&
(ia_ro.ro_rt->rt_ifp == V_loif)) {
RT_LOCK(ia_ro.ro_rt);
OpenPOWER on IntegriCloud