summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-17 13:53:06 -0300
committerRenato Botelho <renato@netgate.com>2015-08-17 13:53:06 -0300
commit689b5417f72add01420332db0de4cc23023cc04a (patch)
treecac35a18a77d21feadfd276d0e75d3ac7ab59afd
parent2042629d2832f01aedf341b8cfdf333f39743595 (diff)
downloadFreeBSD-src-689b5417f72add01420332db0de4cc23023cc04a.zip
FreeBSD-src-689b5417f72add01420332db0de4cc23023cc04a.tar.gz
Importing pfSense patch if_bridge_gif_mtu.diff
-rw-r--r--sys/net/if_bridge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index f7c6365..25884a4 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -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,
@@ -1106,6 +1108,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) {
@@ -1113,6 +1116,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)
OpenPOWER on IntegriCloud