| 2598 | } |
| 2599 | |
| 2600 | static struct mbuf * |
| 2601 | lagg_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 | } |
nothing calls this directly
no test coverage detected