* bridge_dummynet: * * Receive a queued packet from dummynet and pass it on to the output * interface. * * The mbuf has the Ethernet header already attached. */
| 2004 | * The mbuf has the Ethernet header already attached. |
| 2005 | */ |
| 2006 | static void |
| 2007 | bridge_dummynet(struct mbuf *m, struct ifnet *ifp) |
| 2008 | { |
| 2009 | struct bridge_softc *sc; |
| 2010 | |
| 2011 | sc = ifp->if_bridge; |
| 2012 | |
| 2013 | /* |
| 2014 | * The packet didnt originate from a member interface. This should only |
| 2015 | * ever happen if a member interface is removed while packets are |
| 2016 | * queued for it. |
| 2017 | */ |
| 2018 | if (sc == NULL) { |
| 2019 | m_freem(m); |
| 2020 | return; |
| 2021 | } |
| 2022 | |
| 2023 | if (PFIL_HOOKED_OUT(V_inet_pfil_head) |
| 2024 | #ifdef INET6 |
| 2025 | || PFIL_HOOKED_OUT(V_inet6_pfil_head) |
| 2026 | #endif |
| 2027 | ) { |
| 2028 | if (bridge_pfil(&m, sc->sc_ifp, ifp, PFIL_OUT) != 0) |
| 2029 | return; |
| 2030 | if (m == NULL) |
| 2031 | return; |
| 2032 | } |
| 2033 | |
| 2034 | bridge_enqueue(sc, ifp, m); |
| 2035 | } |
| 2036 | |
| 2037 | /* |
| 2038 | * bridge_output: |
nothing calls this directly
no test coverage detected