netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vlan: propogate MTU changes
@ 2008-10-06 15:30 Stephen Hemminger
  2008-10-06 16:02 ` Patrick McHardy
  2008-10-06 20:14 ` Krzysztof Oledzki
  0 siblings, 2 replies; 17+ messages in thread
From: Stephen Hemminger @ 2008-10-06 15:30 UTC (permalink / raw)
  To: Patrick McHardy, David S. Miller; +Cc: netdev

Propogate MTU changes of underlying device to all related VLAN
devices.
see: https://bugzilla.vyatta.com/show_bug.cgi?id=3742

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
There might be some discussion about whether to preserve MTU changes
on the vlan device if done after startup, but this seems like the best,
most direct fix.

--- a/net/8021q/vlan.c	2008-10-06 17:03:58.000000000 +0200
+++ b/net/8021q/vlan.c	2008-10-06 17:08:33.000000000 +0200
@@ -477,6 +477,17 @@ static int vlan_device_event(struct noti
 
 		break;
 
+	case NETDEV_CHANGEMTU:
+		/* Propogate MTU of underlying device */
+		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+			vlandev = vlan_group_get_device(grp, i);
+			if (!vlandev)
+				continue;
+
+			vlandev->mtu = dev->mtu;
+		}
+		break;
+
 	case NETDEV_DOWN:
 		/* Put all VLANs for this dev in the down state too.  */
 		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-10-08 11:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 15:30 [PATCH] vlan: propogate MTU changes Stephen Hemminger
2008-10-06 16:02 ` Patrick McHardy
2008-10-06 17:54   ` Stephen Hemminger
2008-10-06 18:25     ` [PATCH] vlan: propogate MTU changes (v2) Stephen Hemminger
2008-10-06 18:45       ` Duyck, Alexander H
2008-10-06 19:20         ` Ben Hutchings
2008-10-06 22:53       ` Patrick McHardy
2008-10-06 22:33     ` [PATCH] vlan: propogate MTU changes Patrick McHardy
2008-10-06 22:50       ` Rick Jones
2008-10-06 23:02         ` Patrick McHardy
2008-10-06 23:04           ` Patrick McHardy
2008-10-06 23:18           ` Rick Jones
2008-10-06 23:33             ` Patrick McHardy
2008-10-07 23:05               ` David Miller
2008-10-08 11:53               ` Patrick McHardy
2008-10-06 20:14 ` Krzysztof Oledzki
2008-10-06 22:38   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).