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

Function lagg_lacp_input

freebsd/net/if_lagg.c:2600–2628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2598}
2599
2600static struct mbuf *
2601lagg_lacp_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
2602{
2603 struct ifnet *ifp = sc->sc_ifp;
2604 struct ether_header *eh;
2605 u_short etype;
2606
2607 eh = mtod(m, struct ether_header *);
2608 etype = ntohs(eh->ether_type);
2609
2610 /* Tap off LACP control messages */
2611 if ((m->m_flags & M_VLANTAG) == 0 && etype == ETHERTYPE_SLOW) {
2612 m = lacp_input(lp, m);
2613 if (m == NULL)
2614 return (NULL);
2615 }
2616
2617 /*
2618 * If the port is not collecting or not in the active aggregator then
2619 * free and return.
2620 */
2621 if (lacp_iscollecting(lp) == 0 || lacp_isactive(lp) == 0) {
2622 m_freem(m);
2623 return (NULL);
2624 }
2625
2626 m->m_pkthdr.rcvif = ifp;
2627 return (m);
2628}

Callers

nothing calls this directly

Calls 4

lacp_inputFunction · 0.85
lacp_iscollectingFunction · 0.85
lacp_isactiveFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected