* bridge_span: * * Duplicate a packet out one or more interfaces that are in span mode, * the original mbuf is unmodified. */
| 2629 | * the original mbuf is unmodified. |
| 2630 | */ |
| 2631 | static void |
| 2632 | bridge_span(struct bridge_softc *sc, struct mbuf *m) |
| 2633 | { |
| 2634 | struct bridge_iflist *bif; |
| 2635 | struct ifnet *dst_if; |
| 2636 | struct mbuf *mc; |
| 2637 | |
| 2638 | NET_EPOCH_ASSERT(); |
| 2639 | |
| 2640 | if (CK_LIST_EMPTY(&sc->sc_spanlist)) |
| 2641 | return; |
| 2642 | |
| 2643 | CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) { |
| 2644 | dst_if = bif->bif_ifp; |
| 2645 | |
| 2646 | if ((dst_if->if_drv_flags & IFF_DRV_RUNNING) == 0) |
| 2647 | continue; |
| 2648 | |
| 2649 | mc = m_copypacket(m, M_NOWAIT); |
| 2650 | if (mc == NULL) { |
| 2651 | if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); |
| 2652 | continue; |
| 2653 | } |
| 2654 | |
| 2655 | bridge_enqueue(sc, dst_if, mc); |
| 2656 | } |
| 2657 | } |
| 2658 | |
| 2659 | /* |
| 2660 | * bridge_rtupdate: |
no test coverage detected