diff --git a/share/man/man4/if_bridge.4 b/share/man/man4/if_bridge.4 index 0a927e53ad66..0a8c624ab1b8 100644 --- a/share/man/man4/if_bridge.4 +++ b/share/man/man4/if_bridge.4 @@ -133,6 +133,9 @@ the filter for processing. Note that packets to and from the bridging host will be seen by the filter on the interface with the appropriate address configured as well as on the interface on which the packet arrives or departs. +.Pp +The MTU of the first member interface to be added is used as the bridge MTU, +all additional members are required to have exactly the same value. .Sh EXAMPLES The following when placed in the file .Pa /etc/rc.conf diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index c7987c2f4e01..bd0958e0565e 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -716,8 +716,13 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) if (ifs == NULL) return (ENOENT); - if (sc->sc_ifp->if_mtu != ifs->if_mtu) + /* Allow the first member to define the MTU */ + if (LIST_EMPTY(&sc->sc_iflist)) + sc->sc_ifp->if_mtu = ifs->if_mtu; + else if (sc->sc_ifp->if_mtu != ifs->if_mtu) { + if_printf(sc->sc_ifp, "invalid MTU for %s\n", ifs->if_xname); return (EINVAL); + } if (ifs->if_bridge == sc) return (EEXIST);