/[base]
ViewVC logotype

Revision 271840


Jump to revision: Previous Next
Author: asomers
Date: Thu Sep 18 21:48:05 2014 UTC (9 years, 9 months ago)
Changed paths: 7
Log Message:
MFC r264905 and r266860, except for the ATF parts.

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.

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.

PR:             kern/187550
PR:             kern/187552


Changed paths

Path Details
Directorystable/9/ modified , props changed
Directorystable/9/sys/ modified , props changed
Directorystable/9/sys/net/ modified , props changed
Directorystable/9/sys/net/if.c modified , text changed
Directorystable/9/sys/net/if_var.h modified , text changed
Directorystable/9/sys/net/route.c modified , text changed
Directorystable/9/sys/netinet/in.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27