diff options
author | thompsa <thompsa@FreeBSD.org> | 2005-07-25 02:22:37 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2005-07-25 02:22:37 +0000 |
commit | b8029d769b8e125c60a0b39be2ceeaa49e2bda06 (patch) | |
tree | 1cf6440ad3bc279e9a70fb43f54ccecec53313e2 /sys/net | |
parent | 1d80a8864a1d70a05dfec703cae6be7028dcb5be (diff) | |
download | FreeBSD-src-b8029d769b8e125c60a0b39be2ceeaa49e2bda06.zip FreeBSD-src-b8029d769b8e125c60a0b39be2ceeaa49e2bda06.tar.gz |
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)
MFC after: 3 days
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_bridge.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 4aed44a..90f053f 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -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) { |