freebsd-skq/sys/net
asomers a8aa481895 MFC changes relating to running multiple interfaces on different fibs but
with addresses on the same subnet.

MFC r266860

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.

MFC r264917

Style fixes, mostly trailing whitespace elimination.  No functional change.

MFC r264905

Fix subnet and default routes on different FIBs on the same subnet.

These two bugs are closely related.  The root cause is that ifa_ifwithnet
does not consider FIBs when searching for an interface address.

sys/net/if_var.h
sys/net/if.c
        Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr.  Those
        functions will only return an address whose interface fib equals the
        argument.

sys/net/route.c
        Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib
        arguments.

sys/netinet/in.c
        Update in_addprefix to consider the interface fib when adding
        prefixes.  This will prevent it from not adding a subnet route when
        one already exists on a different fib.

sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/netinet6/nd6.c
        Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet.
        In some cases it there wasn't a clear specific fib number to use.
        In others, I was unable to test those functions so I chose
        RT_DEFAULT_FIB to minimize divergence from current behavior.  I will
        fix some of the latter changes along with PR kern/187553.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
        Revert r263738.  The udp_dontroute test was right all along.
        However, bugs kern/187550 and kern/187553 cancelled each other out
        when it came to this test.  Because of kern/187553, ifa_ifwithnet
        searched the default fib instead of the requested one, but because
        of kern/187550, there was an applicable subnet route on the default
        fib.  The new test added in r263738 doesn't work right, however.  I
        can verify with dtrace that ifa_ifwithnet returned the wrong address
        before I applied this commit, but route(8) miraculously found the
        correct interface to use anyway.  I don't know how.

        Clear expected failure messages for kern/187550 and kern/187552.

MFC r263738

tests/sys/netinet/Makefile
tests/sys/netinet/fibs.sh
        Replace fibs:udp_dontroute with fibs:src_addr_selection_by_subnet.
        The original test was poorly written; it was actually testing
        kern/167947 instead of the desired kern/187553.  The root cause of the
        bug is that ifa_ifwithnet did not have a fib argument.  The new test
        more directly targets that behavior.

tests/sys/netinet/udp_dontroute.c
        Delete the auxilliary binary used by the old test
2014-06-06 20:35:40 +00:00
..
bpf_buffer.c Changes to resolve races in bpfread() and catchpacket() that, at worst, 2012-12-10 16:14:44 +00:00
bpf_buffer.h Call bpf_jitter() before acquiring BPF global lock due to malloc() being used inside bpf_jitter. 2012-05-21 22:19:19 +00:00
bpf_filter.c MFC various fixes to the tools/regression/ tests. 2014-04-14 13:30:08 +00:00
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason 2012-08-05 14:11:42 +00:00
bpf_zerocopy.h
bpf.c While waiting for the bpf hold buffer to become idle, check 2013-05-23 21:33:10 +00:00
bpf.h Changes to resolve races in bpfread() and catchpacket() that, at worst, 2012-12-10 16:14:44 +00:00
bpfdesc.h Changes to resolve races in bpfread() and catchpacket() that, at worst, 2012-12-10 16:14:44 +00:00
bridgestp.c Use m_get/m_gethdr instead of compat macros. 2013-03-15 12:55:30 +00:00
bridgestp.h Move the interface media check to a taskqueue, some interfaces (usb) sleep 2012-04-20 10:06:28 +00:00
ethernet.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
fddi.h
firewire.h
flowtable.c Merge r262770 from head: pacify gcc. 2014-03-05 03:16:23 +00:00
flowtable.h Merge r261582, r261601, r261610, r261613, r261627, r261640, r261641, r261823, 2014-03-04 15:14:47 +00:00
ieee8023ad_lacp.c MFC r260070 2014-01-02 01:51:54 +00:00
ieee8023ad_lacp.h Break out the static, global LACP debug options into a per-lagg unit 2013-07-26 19:41:13 +00:00
if_arc.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_arcsubr.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_arp.h Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU 2013-07-09 09:50:15 +00:00
if_atm.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_atmsubr.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_bridge.c - Relax the restriction on the member interfaces with LLAs. Two or more 2013-07-28 19:49:39 +00:00
if_bridgevar.h
if_clone.c Fix VIMAGE build. 2012-10-17 21:19:27 +00:00
if_clone.h Make the "struct if_clone" opaque to users of the cloning API. Users 2012-10-16 13:37:54 +00:00
if_dead.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_debug.c
if_disc.c Merge r262763, r262767, r262771, r262806 from head: 2014-03-21 15:15:30 +00:00
if_dl.h Use the LLINDEX macro to access the link-level I/F index. This makes 2012-05-19 02:39:43 +00:00
if_edsc.c Make the "struct if_clone" opaque to users of the cloning API. Users 2012-10-16 13:37:54 +00:00
if_ef.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_enc.c Fix a fallout from r241610. One enc interface must be created on startup. 2013-09-28 14:14:23 +00:00
if_enc.h
if_epair.c Utilize new macro to initialize if_baudrate(). 2012-10-18 09:57:56 +00:00
if_ethersubr.c Bulk sync of pf changes from head, in attempt to fixup broken build I 2014-03-12 10:45:58 +00:00
if_faith.c Merge r262763, r262767, r262771, r262806 from head: 2014-03-21 15:15:30 +00:00
if_fddisubr.c Remove unnecessary setup of the m->pkthdr.header pointer. 2013-08-25 09:41:37 +00:00
if_fwsubr.c Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_gif.c Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is 2013-09-11 09:19:44 +00:00
if_gif.h Add const qualifier to the dst parameter of the ifnet if_output method. 2013-04-26 12:50:32 +00:00
if_gre.c Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is 2013-09-11 09:19:44 +00:00
if_gre.h
if_iso88025subr.c Remove unnecessary setup of the m->pkthdr.header pointer. 2013-08-25 09:41:37 +00:00
if_lagg.c MFC: r264469, r264498 2014-05-06 02:44:01 +00:00
if_lagg.h MFC r260070 2014-01-02 01:51:54 +00:00
if_llatbl.c Back out r249318, r249320 and r249327 due to a heisenbug most 2013-05-06 16:42:18 +00:00
if_llatbl.h Remove include opt_ofed.h since OFED is unifdef'd. 2013-08-27 16:45:00 +00:00
if_llc.h
if_loop.c Merge r262763, r262767, r262771, r262806 from head: 2014-03-21 15:15:30 +00:00
if_media.c
if_media.h MFC r256689: 2013-11-11 09:47:51 +00:00
if_mib.c
if_mib.h
if_pflog.h o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
if_pfsync.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
if_sppp.h
if_spppfr.c Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
if_spppsubr.c Clean up SIOCSIFDSTADDR usage from ifnet drivers. The ioctl itself is 2013-09-11 09:19:44 +00:00
if_stf.c Merge r262763, r262767, r262771, r262806 from head: 2014-03-21 15:15:30 +00:00
if_stf.h
if_tap.c MFC r257078 2013-10-28 22:41:36 +00:00
if_tap.h
if_tapvar.h Revert part of an earlier patch attempt that snuck in with r240938. 2012-09-25 23:41:45 +00:00
if_tun.c Merge from project branch via main. Uninteresting commits are trimmed. 2013-10-12 15:31:36 +00:00
if_tun.h
if_types.h
if_var.h MFC changes relating to running multiple interfaces on different fibs but 2014-06-06 20:35:40 +00:00
if_vlan_var.h
if_vlan.c MFC: r264517 2014-05-06 02:49:31 +00:00
if.c MFC changes relating to running multiple interfaces on different fibs but 2014-06-06 20:35:40 +00:00
if.h o Provide a compatibility shim for netstat(1) to obtain output queue 2014-04-03 14:58:52 +00:00
iso88025.h Merge r263203: garbage collect long time obsoleted (or never used) stuff 2014-04-09 11:15:50 +00:00
netisr_internal.h
netisr.c Retire netisr.netisr_direct and netisr.netisr_direct_force sysctls. 2013-09-06 21:02:43 +00:00
netisr.h
netmap_user.h MFH: sync the netmap code with the one in HEAD 2014-02-18 05:01:04 +00:00
netmap.h MFH: sync the netmap code with the one in HEAD 2014-02-18 05:01:04 +00:00
pfil.c ename PFIL_LIST_[UN]LOCK() to PFIL_HEADLIST_[UN]LOCK() to avoid 2013-08-24 11:24:15 +00:00
pfil.h Whitespace, style cleanups, and improved comments. 2013-08-24 12:03:24 +00:00
pfkeyv2.h
pfvar.h MFC r264689: 2014-04-27 09:05:34 +00:00
ppp_defs.h Allow certain headers to be included more easily. 2013-05-21 21:20:10 +00:00
radix_mpath.c Merge r260379, r260460. 2014-05-08 20:41:39 +00:00
radix_mpath.h
radix.c Merge r259528, r259528, r260295. 2014-05-08 20:27:06 +00:00
radix.h Merge r259528, r259528, r260295. 2014-05-08 20:27:06 +00:00
raw_cb.c
raw_cb.h
raw_usrreq.c
route.c MFC changes relating to running multiple interfaces on different fibs but 2014-06-06 20:35:40 +00:00
route.h Merge 260488, r260508. 2014-05-08 21:03:31 +00:00
rtsock.c Merge 260488, r260508. 2014-05-08 21:03:31 +00:00
sff8472.h MFC 260207 2014-02-14 00:26:30 +00:00
slcompress.c
slcompress.h
vnet.c Merge r261590, r261592 from head: 2014-03-04 14:01:12 +00:00
vnet.h Merge r261590: Fixup for r261590 (vnet sysctl handlers cleanup) 2014-03-04 14:05:37 +00:00
zlib.c Juggle some internal symbols from our antique zlib (that originally came 2013-01-06 14:59:59 +00:00
zlib.h Juggle some internal symbols from our antique zlib (that originally came 2013-01-06 14:59:59 +00:00
zutil.h