diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-07-02 21:04:08 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-07-02 21:04:08 +0000 |
commit | 6ad7446c6f3ac5636428bc4064a48fb0b65905ae (patch) | |
tree | bca4738e23bdfd4958f3c6471b7f772535dc4d4c /sys/netinet6/in6_src.c | |
parent | f60b4812d88581ff7932e4d9d7a50ecccce0e727 (diff) | |
download | src-6ad7446c6f3ac5636428bc4064a48fb0b65905ae.tar.gz src-6ad7446c6f3ac5636428bc4064a48fb0b65905ae.zip |
Complete conversions from fib<4|6>_lookup_nh_<basic|ext> to fib<4|6>_lookup().
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
Notes:
svn path=/head/; revision=362900
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r-- | sys/netinet6/in6_src.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 74a4c283388a..8c0f3b334b54 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -916,15 +916,16 @@ in6_selecthlim(struct inpcb *inp, struct ifnet *ifp) else if (ifp) return (ND_IFINFO(ifp)->chlim); else if (inp && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { - struct nhop6_basic nh6; + struct nhop_object *nh; struct in6_addr dst; uint32_t fibnum, scopeid; int hlim; fibnum = inp->inp_inc.inc_fibnum; in6_splitscope(&inp->in6p_faddr, &dst, &scopeid); - if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6)==0){ - hlim = ND_IFINFO(nh6.nh_ifp)->chlim; + nh = fib6_lookup(fibnum, &dst, scopeid, 0, 0); + if (nh != NULL) { + hlim = ND_IFINFO(nh->nh_ifp)->chlim; return (hlim); } } |