Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_stf.c
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
#include <machine/cpu.h> | #include <machine/cpu.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/if_var.h> | #include <net/if_var.h> | ||||
#include <net/if_clone.h> | #include <net/if_clone.h> | ||||
#include <net/route.h> | #include <net/route.h> | ||||
#include <net/route/nhop.h> | |||||
#include <net/netisr.h> | #include <net/netisr.h> | ||||
#include <net/if_types.h> | #include <net/if_types.h> | ||||
#include <net/vnet.h> | #include <net/vnet.h> | ||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <netinet/in_fib.h> | #include <netinet/in_fib.h> | ||||
#include <netinet/in_systm.h> | #include <netinet/in_systm.h> | ||||
#include <netinet/ip.h> | #include <netinet/ip.h> | ||||
▲ Show 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | CK_STAILQ_FOREACH(ia4, &V_in_ifaddrhead, ia_link) { | ||||
} | } | ||||
} | } | ||||
IN_IFADDR_RUNLOCK(&in_ifa_tracker); | IN_IFADDR_RUNLOCK(&in_ifa_tracker); | ||||
/* | /* | ||||
* perform ingress filter | * perform ingress filter | ||||
*/ | */ | ||||
if (sc && (STF2IFP(sc)->if_flags & IFF_LINK2) == 0 && inifp) { | 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); | return (-1); | ||||
if (nh4.nh_ifp != inifp) | if (nh->nh_ifp != inifp) | ||||
return (-1); | return (-1); | ||||
} | } | ||||
return 0; | return 0; | ||||
} | } | ||||
static int | static int | ||||
stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) | stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |