MFC: if_bridge.c, r1.14

>   We check that all the member interfaces have the same MTU on attach to the
>   bridge but the interface can still be changed afterwards.
>
>   This falls under the 'dont do that' category but log an warning when INVARIANTS
>   is defined.
>
>   Approved by:    mlaier (mentor)
>
>   Revision  Changes    Path
>   1.14      +8 -0      src/sys/net/if_bridge.c

Approved by:	re (kensmith), mlaier (mentor)
This commit is contained in:
thompsa 2005-08-05 20:33:21 +00:00
parent 57239477c4
commit 7a0ffa9c57

View File

@ -1257,6 +1257,14 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m)
len = m->m_pkthdr.len;
mflags = m->m_flags;
#ifdef INVARIANTS
if (len > dst_ifp->if_mtu)
if_printf(sc->sc_ifp,
"MTU mismatch, frame length %d exceeds %ld on %s\n", len,
dst_ifp->if_mtu, dst_ifp->if_xname);
#endif
IFQ_ENQUEUE(&dst_ifp->if_snd, m, err);
if (err == 0) {