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/net/if_stf.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/net/if_stf.c')
-rw-r--r-- | sys/net/if_stf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index f7a07d98ee4e..c3f26db3f6e6 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -97,6 +97,7 @@ #include <net/if_var.h> #include <net/if_clone.h> #include <net/route.h> +#include <net/route/nhop.h> #include <net/netisr.h> #include <net/if_types.h> #include <net/vnet.h> @@ -568,12 +569,14 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *in, struct ifnet *inifp) * perform ingress filter */ if (sc && (STF2IFP(sc)->if_flags & IFF_LINK2) == 0 && inifp) { - struct nhop4_basic nh4; + struct nhop_object *nh; - if (fib4_lookup_nh_basic(sc->sc_fibnum, *in, 0, 0, &nh4) != 0) + NET_EPOCH_ASSERT(); + nh = fib4_lookup(sc->sc_fibnum, *in, 0, 0, 0); + if (nh == NULL) return (-1); - if (nh4.nh_ifp != inifp) + if (nh->nh_ifp != inifp) return (-1); } |