Projet

Général

Profil

Télécharger (1019 octets) Statistiques
| Branche: | Révision:

univnautes-tools / patches / stable / 10 / if_bridge_gif_mtu.diff @ 4ab3b90b

1
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
2
index 572ee06..6e060f0 100644
3
--- a/sys/net/if_bridge.c
4
+++ b/sys/net/if_bridge.c
5
@@ -815,6 +815,8 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
6
 		}
7
 		BRIDGE_LOCK(sc);
8
 		LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
9
+			if (bif->bif_ifp->if_type == IFT_GIF)
10
+				continue;
11
 			if (bif->bif_ifp->if_mtu != ifr->ifr_mtu) {
12
 				log(LOG_NOTICE, "%s: invalid MTU: %lu(%s)"
13
 				    " != %d\n", sc->sc_ifp->if_xname,
14
@@ -1103,6 +1105,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
15
 	}
16
 #endif
17
 	/* Allow the first Ethernet member to define the MTU */
18
+	if (ifs->if_type != IFT_GIF) {
19
 	if (LIST_EMPTY(&sc->sc_iflist))
20
 		sc->sc_ifp->if_mtu = ifs->if_mtu;
21
 	else if (sc->sc_ifp->if_mtu != ifs->if_mtu) {
22
@@ -1110,6 +1113,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
23
 		    ifs->if_mtu, ifs->if_xname, sc->sc_ifp->if_mtu);
24
 		return (EINVAL);
25
 	}
26
+	}
27
 
28
 	bif = malloc(sizeof(*bif), M_DEVBUF, M_NOWAIT|M_ZERO);
29
 	if (bif == NULL)
(20-20/67)