diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index e263b0b23d86..12a7949b420c 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -446,7 +446,7 @@ bstp_pdu_flags(struct bstp_port *bp) return (flags); } -struct mbuf * +void bstp_input(struct bstp_port *bp, struct ifnet *ifp, struct mbuf *m) { struct bstp_state *bs = bp->bp_bs; @@ -456,7 +456,7 @@ bstp_input(struct bstp_port *bp, struct ifnet *ifp, struct mbuf *m) if (bp->bp_active == 0) { m_freem(m); - return (NULL); + return; } BSTP_LOCK(bs); @@ -521,7 +521,6 @@ bstp_input(struct bstp_port *bp, struct ifnet *ifp, struct mbuf *m) BSTP_UNLOCK(bs); if (m) m_freem(m); - return (NULL); } static void diff --git a/sys/net/bridgestp.h b/sys/net/bridgestp.h index fdf16aa6b10f..8cec09c83828 100644 --- a/sys/net/bridgestp.h +++ b/sys/net/bridgestp.h @@ -392,6 +392,6 @@ int bstp_set_edge(struct bstp_port *, int); int bstp_set_autoedge(struct bstp_port *, int); int bstp_set_ptp(struct bstp_port *, int); int bstp_set_autoptp(struct bstp_port *, int); -struct mbuf *bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *); +void bstp_input(struct bstp_port *, struct ifnet *, struct mbuf *); #endif /* _KERNEL */ diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 8f9dc9c37f6e..bf00cb4cd792 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -2215,11 +2215,9 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) /* Tap off 802.1D packets; they do not get forwarded. */ if (memcmp(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN) == 0) { - m = bstp_input(&bif->bif_stp, ifp, m); - if (m == NULL) { - BRIDGE_UNLOCK(sc); - return (NULL); - } + bstp_input(&bif->bif_stp, ifp, m); /* consumes mbuf */ + BRIDGE_UNLOCK(sc); + return (NULL); } if ((bif->bif_flags & IFBIF_STP) &&