MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lagg_fail_input

Function lagg_fail_input

freebsd/net/if_lagg.c:2403–2428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2401}
2402
2403static struct mbuf *
2404lagg_fail_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
2405{
2406 struct ifnet *ifp = sc->sc_ifp;
2407 struct lagg_port *tmp_tp;
2408
2409 if (lp == sc->sc_primary || V_lagg_failover_rx_all) {
2410 m->m_pkthdr.rcvif = ifp;
2411 return (m);
2412 }
2413
2414 if (!LAGG_PORTACTIVE(sc->sc_primary)) {
2415 tmp_tp = lagg_link_active(sc, sc->sc_primary);
2416 /*
2417 * If tmp_tp is null, we've received a packet when all
2418 * our links are down. Weird, but process it anyways.
2419 */
2420 if ((tmp_tp == NULL || tmp_tp == lp)) {
2421 m->m_pkthdr.rcvif = ifp;
2422 return (m);
2423 }
2424 }
2425
2426 m_freem(m);
2427 return (NULL);
2428}
2429
2430/*
2431 * Loadbalancing

Callers

nothing calls this directly

Calls 2

lagg_link_activeFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected