HomeFreeBSD

Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().

Description

Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().

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)

Details

Committed
melifaroJan 10 2016, 1:40 PM
Reviewer
ae
Parents
rS293632: Do not hold ifaddr reference for the whole icmp6_reflect() exec time.
Branches
Unknown
Tags
Unknown