diff options
author | asomers <asomers@FreeBSD.org> | 2014-05-29 21:03:49 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2014-05-29 21:03:49 +0000 |
commit | 7ca8bf0f2c27a73f51aeaa039bf10ab3c6af198b (patch) | |
tree | ed9260026601a89dc26686a804ac2c527bebd5a4 /sys/net/rtsock.c | |
parent | 393fef9e249af24add064cdafb84b546ef5a40b7 (diff) | |
download | FreeBSD-src-7ca8bf0f2c27a73f51aeaa039bf10ab3c6af198b.zip FreeBSD-src-7ca8bf0f2c27a73f51aeaa039bf10ab3c6af198b.tar.gz |
Fix unintended KBI change from r264905. Add _fib versions of
ifa_ifwithnet() and ifa_ifwithdstaddr() The legacy functions will call the
_fib() versions with RT_ALL_FIBS, preserving legacy behavior.
sys/net/if_var.h
sys/net/if.c
Add legacy-compatible functions as described above. Ensure legacy
behavior when RT_ALL_FIBS is passed as fibnum.
sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/net/route.c
sys/net/rtsock.c
sys/netinet6/nd6.c
Call with _fib() functions if we must use a specific fib, or the
legacy functions otherwise.
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
Improve the udp_dontroute test. The bug that this test exercises is
that ifa_ifwithnet() will return the wrong address, if multiple
interfaces have addresses on the same subnet but with different
fibs. The previous version of the test only considered one possible
failure mode: that ifa_ifwithnet_fib() might fail to find any
suitable address at all. The new version also checks whether
ifa_ifwithnet_fib() finds the correct address by checking where the
ARP request goes.
Reported by: bz, hrs
Reviewed by: hrs
MFC after: 1 week
X-MFC-with: 264905
Sponsored by: Spectra Logic
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3a6afca..f745f69 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -752,8 +752,7 @@ route_output(struct mbuf *m, struct socket *so) rt->rt_ifp->if_type == IFT_PROPVIRTUAL) { struct ifaddr *ifa; - ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1, - RT_DEFAULT_FIB); + ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1); if (ifa != NULL) rt_maskedcopy(ifa->ifa_addr, &laddr, |