mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
tools: apply if_bridge_gif_mtu.diff
This commit is contained in:
parent
db3a0efd14
commit
cfcc41b5f6
1 changed files with 4 additions and 0 deletions
|
|
@ -815,6 +815,8 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
|||
}
|
||||
BRIDGE_LOCK(sc);
|
||||
LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
|
||||
if (bif->bif_ifp->if_type == IFT_GIF)
|
||||
continue;
|
||||
if (bif->bif_ifp->if_mtu != ifr->ifr_mtu) {
|
||||
log(LOG_NOTICE, "%s: invalid MTU: %lu(%s)"
|
||||
" != %d\n", sc->sc_ifp->if_xname,
|
||||
|
|
@ -1103,6 +1105,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
|
|||
}
|
||||
#endif
|
||||
/* Allow the first Ethernet member to define the MTU */
|
||||
if (ifs->if_type != IFT_GIF) {
|
||||
if (LIST_EMPTY(&sc->sc_iflist))
|
||||
sc->sc_ifp->if_mtu = ifs->if_mtu;
|
||||
else if (sc->sc_ifp->if_mtu != ifs->if_mtu) {
|
||||
|
|
@ -1110,6 +1113,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
|
|||
ifs->if_mtu, ifs->if_xname, sc->sc_ifp->if_mtu);
|
||||
return (EINVAL);
|
||||
}
|
||||
}
|
||||
|
||||
bif = malloc(sizeof(*bif), M_DEVBUF, M_NOWAIT|M_ZERO);
|
||||
if (bif == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue