diff options
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 3c9cc8e..0ebdc56 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -113,6 +113,9 @@ int (*bridge_output_p)(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); void (*bridge_dn_p)(struct mbuf *, struct ifnet *); +/* if_trunk(4) support */ +struct mbuf *(*trunk_input_p)(struct ifnet *, struct mbuf *); + static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -602,6 +605,17 @@ ether_input(struct ifnet *ifp, struct mbuf *m) return; } + /* Handle input from a trunk(4) port */ + if (ifp->if_type == IFT_IEEE8023ADLAG) { + KASSERT(trunk_input_p != NULL, + ("%s: if_trunk not loaded!", __func__)); + m = (*trunk_input_p)(ifp, m); + if (m != NULL) + ifp = m->m_pkthdr.rcvif; + else + return; + } + /* * If the hardware did not process an 802.1Q tag, do this now, * to allow 802.1P priority frames to be passed to the main input |