summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-20 07:35:37 -0700
committerDavid S. Miller <davem@davemloft.net>2009-07-20 07:35:37 -0700
commit2e477c9bd2bb6a1606e498adb53ba913378ecdf2 (patch)
treefc1e7b9488cac5a66ac1c5f2196a2400fe5fdf52 /net
parent37cf2b8d1622897cf57e70cdab9eba57feb5ff6c (diff)
downloadop-kernel-dev-2e477c9bd2bb6a1606e498adb53ba913378ecdf2.zip
op-kernel-dev-2e477c9bd2bb6a1606e498adb53ba913378ecdf2.tar.gz
vlan: Propagate physical MTU changes
When the physical MTU changes we want to ensure that all existing VLAN device MTUs do not exceed the new underlying MTU. This patch adds that propagation. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index fe64908..6d37b7e 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -468,6 +468,19 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
}
break;
+ case NETDEV_CHANGEMTU:
+ for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+ vlandev = vlan_group_get_device(grp, i);
+ if (!vlandev)
+ continue;
+
+ if (vlandev->mtu <= dev->mtu)
+ continue;
+
+ dev_set_mtu(vlandev, dev->mtu);
+ }
+ break;
+
case NETDEV_FEAT_CHANGE:
/* Propagate device features to underlying device */
for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
OpenPOWER on IntegriCloud