summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_src.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused nhop_ref_any() function.Alexander V. Chernikov2020-09-201-2/+0
| | | | | | | | | Remove "opt_mpath.h" header where not needed. No functional changes. Notes: svn path=/head/; revision=365930
* net: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-1/+0
| | | | Notes: svn path=/head/; revision=365071
* Complete conversions from fib<4|6>_lookup_nh_<basic|ext> to fib<4|6>_lookup().Alexander V. Chernikov2020-07-021-3/+4
| | | | | | | | | | | | | fib[46]_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. With no callers remaining, remove fib[46]_lookup_nh_ functions. Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D25445 Notes: svn path=/head/; revision=362900
* Fix IPv6 link-local operations with RADIX_MPATH.Alexander V. Chernikov2020-04-261-8/+1
| | | | | | | | | | | It was broken by r360292 as fib6_lookup() assumes de-embedded addresses while rtalloc_mpath_fib() requires sockaddr with embedded ones. New fib6_lookup() transparently supports multipath, hence remove old RADIX_MPATH condition. Notes: svn path=/head/; revision=360348
* Convert route caching to nexthop caching.Alexander V. Chernikov2020-04-251-63/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is build on top of nexthop objects introduced in r359823. Nexthops are separate datastructures, containing all necessary information to perform packet forwarding such as gateway interface and mtu. Nexthops are shared among the routes, providing more pre-computed cache-efficient data while requiring less memory. Splitting the LPM code and the attached data solves multiple long-standing problems in the routing layer, drastically reduces the coupling with outher parts of the stack and allows to transparently introduce faster lookup algorithms. Route caching was (re)introduced to minimise (slow) routing lookups, allowing for notably better performance for large TCP senders. Caching works by acquiring rtentry reference, which is protected by per-rtentry mutex. If the routing table is changed (checked by comparing the rtable generation id) or link goes down, cache record gets withdrawn. Nexthops have the same reference counting interface, backed by refcount(9). This change merely replaces rtentry with the actual forwarding nextop as a cached object, which is mostly mechanical. Other moving parts like cache cleanup on rtable change remains the same. Differential Revision: https://reviews.freebsd.org/D24340 Notes: svn path=/head/; revision=360292
* ip6: retire in6_selectroute_fib() as promised 8 years agoBjoern A. Zeeb2020-03-031-20/+3
| | | | | | | | | | | In r231852 I added in6_selectroute_fib() as a compat function with the fibnum as an extra argument compared to in6_selectroute() to keep the KPI stable. Way too late retire this function again and add the fib to in6_selectroute() which also only has a single consumer now and was an orphan function before. Notes: svn path=/head/; revision=358575
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* IPv6 cleanup: kernelBjoern A. Zeeb2019-08-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish what was started a few years ago and harmonize IPv6 and IPv4 kernel names. We are down to very few places now that it is feasible to do the change for everything remaining with causing too much disturbance. Remove "aliases" for IPv6 names which confusingly could indicate that we are talking about a different data structure or field or have two fields, one for each address family. Try to follow common conventions used in FreeBSD. * Rename sin6p to sin6 as that is how it is spelt in most places. * Remove "aliases" (#defines) for: - in6pcb which really is an inpcb and nothing separate - sotoin6pcb which is sotoinpcb (as per above) - in6p_sp which is inp_sp - in6p_flowinfo which is inp_flow * Try to use ia6 for in6_addr rather than in6p. * With all these gone also rename the in6p variables to inp as that is what we call it in most of the network stack including parts of netinet6. The reasons behind this cleanup are that we try to further unify netinet and netinet6 code where possible and that people will less ignore one or the other protocol family when doing code changes as they may not have spotted places due to different names for the same thing. No functional changes. Discussed with: tuexen (SCTP changes) MFC after: 3 months Sponsored by: Netflix Notes: svn path=/head/; revision=350531
* Restore IPV6_NEXTHOP option support that seem was partially brokenAndrey V. Elsukov2019-05-241-0/+4
| | | | | | | | | | | | | since r286195. Do not forget results of route lookup and initialize rt and ifp pointers. PR: 238098 Submitted by: Masse Nicolas <nicolas.masse at stormshield eu> MFC after: 1 week Notes: svn path=/head/; revision=348236
* Use the new VNET_DEFINE_STATIC macro when we are defining static VNETAndrew Turner2018-07-241-2/+2
| | | | | | | | | | | variables. Reviewed by: bz Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16147 Notes: svn path=/head/; revision=336676
* Load balance sockets with new SO_REUSEPORT_LB option.Sean Bruno2018-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple programs or threads to bind to the same port and incoming connections will be load balanced using a hash function. Most of the code was copied from a similar patch for DragonflyBSD. However, in DragonflyBSD, load balancing is a global on/off setting and can not be set per socket. This patch allows for simultaneous use of both the current SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system. Required changes to structures: Globally change so_options from 16 to 32 bit value to allow for more options. Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets. Limitations: As DragonflyBSD, a load balance group is limited to 256 pcbs (256 programs or threads sharing the same socket). This is a substantially different contribution as compared to its original incarnation at svn r332894 and reverted at svn r332967. Thanks to rwatson@ for the substantive feedback that is included in this commit. Submitted by: Johannes Lundberg <johalun0@gmail.com> Obtained from: DragonflyBSD Relnotes: Yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11003 Notes: svn path=/head/; revision=334719
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Revert r332894 at the request of the submitter.Sean Bruno2018-04-241-1/+1
| | | | | | | | Submitted by: Johannes Lundberg <johalun0_gmail.com> Sponsored by: Limelight Networks Notes: svn path=/head/; revision=332967
* Load balance sockets with new SO_REUSEPORT_LB optionSean Bruno2018-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple programs or threads to bind to the same port and incoming connections will be load balanced using a hash function. Most of the code was copied from a similar patch for DragonflyBSD. However, in DragonflyBSD, load balancing is a global on/off setting and can not be set per socket. This patch allows for simultaneous use of both the current SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system. Required changes to structures Globally change so_options from 16 to 32 bit value to allow for more options. Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets. Limitations As DragonflyBSD, a load balance group is limited to 256 pcbs (256 programs or threads sharing the same socket). Submitted by: Johannes Lundberg <johanlun0@gmail.com> Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11003 Notes: svn path=/head/; revision=332894
* Do pass removing some write-only variables from the kernel.Alexander Kabaev2017-12-251-4/+1
| | | | | | | | | | | | This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports. Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial) Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c) Differential Revision: https://reviews.freebsd.org/D10385 Notes: svn path=/head/; revision=327173
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Constrain IPv6 routes to single FIBs when net.add_addr_allfibs=0Alan Somers2017-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys/netinet6/icmp6.c Use the interface's FIB for source address selection in ICMPv6 error responses. sys/netinet6/in6.c In in6_newaddrmsg, announce arrival of local addresses on the interface's FIB only. In in6_lltable_rtcheck, use a per-fib ND6 cache instead of a single cache. sys/netinet6/in6_src.c In in6_selectsrc, use the caller's fib instead of the default fib. In in6_selectsrc_socket, remove a superfluous check. sys/netinet6/nd6.c In nd6_lle_event, use the interface's fib for routing socket messages. In nd6_is_new_addr_neighbor, check all FIBs when trying to determine whether an address is a neighbor. Also, simplify the code for point to point interfaces. sys/netinet6/nd6.h sys/netinet6/nd6.c sys/netinet6/nd6_rtr.c Make defrouter_select fib-aware, and make all of its callers pass in the interface fib. sys/netinet6/nd6_nbr.c When inputting a Neighbor Solicitation packet, consider the interface fib instead of the default fib for DAD. Output NS and Neighbor Advertisement packets on the correct fib. sys/netinet6/nd6_rtr.c Allow installing the same host route on different interfaces in different FIBs. If rt_add_addr_allfibs=0, only install or delete the prefix route on the interface fib. tests/sys/netinet/fibs_test.sh Clear some expected failures, but add a skip for the newly revealed BUG217871. PR: 196361 Submitted by: Erick Turnquist <jhujhiti@adjectivism.org> Reported by: Jason Healy <jhealy@logn.net> Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9451 Notes: svn path=/head/; revision=315458
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Revert r313527Ermal Luçi2017-02-101-3/+2
| | | | | | | Heh svn is not git Notes: svn path=/head/; revision=313528
* Correct missed variable name.Ermal Luçi2017-02-101-2/+3
| | | | | | | Reported-by: ohartmann@walstatt.org Notes: svn path=/head/; revision=313527
* Fix regression introduced in r296986.Andrey V. Elsukov2016-04-081-1/+1
| | | | | | | | | | | | | | | | Currently we don't keep zoneid in in6_ifaddr structure, because there is still some code, that doesn't properly initialize sin6_scope_id, but some functions use sa_equal() for addresses comparison. sa_equal() compares full sockaddr_in6 structures and such comparison will fail. For now use zero zoneid in in6ifa_ifwithaddr(). It is safe, because used address is in embedded form. In future we will use zoneid, so mark it with XXX comment. Reported by: kp Tested by: kp Notes: svn path=/head/; revision=297705
* Reduce the number of local variables. Remove redundant check that inpAndrey V. Elsukov2016-03-171-19/+11
| | | | | | | | | pointer isn't NULL, it is safe, because we are handling IPV6_PKTINFO socket option in this block of code. Also, use in6ifa_withaddr() instead of ifa_withaddr(). Notes: svn path=/head/; revision=296986
* Change in6_selectsrc() to allow usage of non-local IPv6 addresses inAndrey V. Elsukov2016-03-171-10/+18
| | | | | | | | | | IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set. Submitted by: n_hibma MFC after: 2 weeks Notes: svn path=/head/; revision=296984
* Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().Alexander V. Chernikov2016-01-101-4/+80
| | | | | | | | | | | | | | | | | | | in6_selectsrc() has 2 class of users: socket-based one (raw/udp/pcb/etc) and socket-less (ND code). The main reason for that change is inability to specify non-default FIB for callers w/o socket since (internally) inpcb is used to determine fib. As as result, add 2 wrappers for in6_selectsrc() (making in6_selectsrc() static): 1) in6_selectsrc_socket() for the former class. Embed scope_ambiguous check along with returning hop limit when needed. 2) in6_selectsrc_addr() for the latter case. Add 'fibnum' argument and pass IPv6 address w/ explicitly specified scope as separate argument. Reviewed by: ae (previous version) Notes: svn path=/head/; revision=293633
* Remove 'struct route_int6' argument from in6_selectsrc() andAlexander V. Chernikov2016-01-031-20/+19
| | | | | | | | | | | | | | | | | | in6_selectif(). The main task of in6_selectsrc() is to return IPv6 SAS (along with output interface used for scope checks). No data-path code uses route argument for caching. The only users are icmp6 (reflect code), ND6 ns/na generation code. All this fucntions are control-plane, so there is no reason to try to 'optimize' something by passing cached route into to ip6_output(). Given that, simplify code by eliminating in6_selectsrc() 'struct route_in6' argument. Since in6_selectif() is used only by in6_selectsrc(), eliminate its 'struct route_in6' argument, too. While here, reshape rte-related code inside in6_selectif() to free lookup result immediately after saving all the needed fields. Notes: svn path=/head/; revision=293101
* Make in_arpinput(), inp_lookup_mcast_ifp(), icmp_reflect(),Alexander V. Chernikov2015-12-091-13/+11
| | | | | | | | | | | | | | | | | ip_dooptions(), icmp6_redirect_input(), in6_lltable_rtcheck(), in6p_lookup_mcast_ifp() and in6_selecthlim() use new routing api. Eliminate now-unused ip_rtaddr(). Fix lookup key fib6_lookup_nh_basic() which was lost diring merge. Make fib6_lookup_nh_basic() and fib6_lookup_nh_extended() always return IPv6 destination address with embedded scope. Currently rw_gateway has it scope embedded, do the same for non-gatewayed destinations. Sponsored by: Yandex LLC Notes: svn path=/head/; revision=292015
* Properly handle IPV6_NEXTHOP socket option in selectroute().Andrey V. Elsukov2015-08-021-62/+23
| | | | | | | | | | | | | o remove disabled code; o if nexthop address is link-local, use embedded scope zone id to determine outgoing interface; o properly fill ro_dst before doing route lookup; o remove LLE lookup, instead check rt_flags for RTF_GATEWAY bit. Sponsored by: Yandex LLC Notes: svn path=/head/; revision=286195
* Remove redundant check.Andrey V. Elsukov2015-08-021-6/+1
| | | | Notes: svn path=/head/; revision=286194
* Convert in_ifaddr_lock and in6_ifaddr_lock to rmlock.Andrey V. Elsukov2015-07-291-4/+6
| | | | | | | | | | | | | | Both are used to protect access to IP addresses lists and they can be acquired for reading several times per packet. To reduce lock contention it is better to use rmlock here. Reviewed by: gnn (previous version) Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D3149 Notes: svn path=/head/; revision=286001
* For now handle only multicast addresses, we still use routes toAndrey V. Elsukov2014-11-101-9/+9
| | | | | | | | | LLA unicasts yet. Sponsored by: Yandex LLC Notes: svn path=/head/; revision=274342
* Use embedded scope zone id to determine outgoing interface for link-localAndrey V. Elsukov2014-11-091-1/+13
| | | | | | | and node-local addresses. Notes: svn path=/head/; revision=274334
* Add the ability to set `prefer_source' flag to an IPv6 address.Andrey V. Elsukov2014-09-091-0/+10
| | | | | | | | | | | | | | It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC Notes: svn path=/head/; revision=271307
* Add the reverse part to rule #9. Also change its description in theAndrey V. Elsukov2014-09-011-0/+2
| | | | | | | | | netstat(8) output. MFC after: 1 week Notes: svn path=/head/; revision=270927
* Add new rule to source address selection algorithm. It prefers addressAndrey V. Elsukov2014-07-301-0/+6
| | | | | | | | | | | with better virtual status. Use ifa_preferred() to choose better address. PR: 187341 Tested by: des MFC after: 1 week Notes: svn path=/head/; revision=269306
* Introduce IN6_MASK_ADDR() macro to unify various hand-rolled codeAlexander V. Chernikov2014-01-081-5/+1
| | | | | | | | | to do IPv6 addr & mask in different places. MFC after: 2 weeks Notes: svn path=/head/; revision=260458
* Use pointer to struct sockaddr_in6 in lla_lookup() call.Andrey V. Elsukov2014-01-031-1/+1
| | | | | | | This prevents from triggering KASSERT in in6_lltable_lookup. Notes: svn path=/head/; revision=260218
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* Fix accounting after the r249528, also add several another counters toAndrey V. Elsukov2013-04-161-1/+12
| | | | | | | the statistics. Notes: svn path=/head/; revision=249546
* The source address selection algorithm tries to apply several rulesAndrey V. Elsukov2013-04-151-10/+7
| | | | | | | | | | for the set of IPv6 addresses. Now each attempt goes into IPv6 statistics, even if given rule did not won. Change this and take into account only those rules, that won. Also add accounting for cases, when algorithm fails to select an address. Notes: svn path=/head/; revision=249528
* Free memory after deleting an address policy entry.Andrey V. Elsukov2013-04-121-0/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=249398
* Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.Andrey V. Elsukov2013-04-091-4/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=249294
* Add no_prefer_iface option.Hajimu UMEMOTO2013-01-091-4/+6
| | | | | | | | | | | | | It stops treating the address on the interface as special by source address selection rule even when the interface is outgoing interface. This is desired in some situation. Requested by: hrs Reviewed by: IHANet folks including hrs MFC after: 1 week Notes: svn path=/head/; revision=245230
* Reduce the overhead of locking, use IF_AFDATA_RLOCK() when we are doingAndrey V. Elsukov2012-11-161-2/+2
| | | | | | | | | | simple lookups. Sponsored by: Yandex LLC MFC after: 1 week Notes: svn path=/head/; revision=243148
* Use consistent style.David E. O'Brien2012-11-131-3/+2
| | | | Notes: svn path=/head/; revision=242938
* Remove __P.Xin LI2012-10-221-6/+6
| | | | | | | | | Submitted by: kevlo Reviewed by: md5(1) MFC after: 2 months Notes: svn path=/head/; revision=241916
* Just add a comment to further investigate when being closer to that codeBjoern A. Zeeb2012-06-221-0/+1
| | | | | | | again next time. The condition of the 2nd if() is very unlikely ever met. Notes: svn path=/head/; revision=237459
* MFp4 bz_ipv6_fast:Bjoern A. Zeeb2012-05-251-2/+1
| | | | | | | | | | | | | | Simplify the code removing a return from an earlier else case, not differing from the default function return called now. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Reviewed by: gnn (as part of the whole) MFC After: 3 days Notes: svn path=/head/; revision=235955
* In selectroute() add a missing fibnum argument to an in6_rtalloc()Bjoern A. Zeeb2012-02-241-8/+7
| | | | | | | | | | | | | | | call in an #if 0 section. In in6_selecthlim() optimize a case where in6p cannot be NULL due to an earlier check. More consistently use u_int instead of int for fibnum function arguments. Sponsored by: Cisco Systems, Inc. MFC after: 3 days Notes: svn path=/head/; revision=232127
* Allow to provide a hint to in6_selectsrc() for the interface using theBjoern A. Zeeb2012-02-141-6/+24
| | | | | | | | | | | | | | | | | | | | | return ifnet double pointer. Pass that hint down to in6_selectif() to be used when i) the default FIB is queried and ii) route lookup fails because the network is not present (i.e. someone deleted the connected subnet). This hint should not be generally used from anywhere outside the neighbor discovery code. We just make use of it from nd6_ns_output(). Extend the nd6_na_output() interface by a nd6_na_output_fib() version and pass the FIB number from the NS mbuf on to NA to allow the new mbuf to inherit the FIB tag and a later lookup from ip6_output() to succeed in the aformentioned example case. Provide a wrapper function for the old public interface also used from CARP but mark it with BURN_BRIDGES to cleanup in HEAD after MFC. Sponsored by: Cisco Systems, Inc. Notes: svn path=/projects/multi-fibv6/head/; revision=231671
* Add multi-FIB IPv6 support to the core network stack supplementingBjoern A. Zeeb2012-02-031-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | the original IPv4 implementation from r178888: - Use RT_DEFAULT_FIB in the IPv4 implementation where noticed. - Use rt*fib() KPI with explicit RT_DEFAULT_FIB where applicable in the NFS code. - Use the new in6_rt* KPI in TCP, gif(4), and the IPv6 network stack where applicable. - Split in6_rtqtimo() and in6_mtutimo() as done in IPv4 and equally prevent multiple initializations of callouts in in6_inithead(). - Use wrapper functions where needed to preserve the current KPI to ease MFCs. Use BURN_BRIDGES to indicate expected future cleanup. - Fix (related) comments (both technical or style). - Convert to rtinit() where applicable and only use custom loops where currently not possible otherwise. - Multicast group, most neighbor discovery address actions and faith(4) are locked to the default FIB. Individual IPv6 addresses will only appear in the default FIB, however redirect information and prefixes of connected subnets are automatically propagated to all FIBs by default (mimicking IPv4 behavior as closely as possible). Sponsored by: Cisco Systems, Inc. Notes: svn path=/projects/multi-fibv6/head/; revision=230942