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
This commit is contained in:
parent
cbbb4a0089
commit
39bb2fca46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148372
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user