lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Oct 2008 12:59:12 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	netdev@...r.kernel.org
Subject: [PATCH 2/2] macvlan: propogate mtu changes

If MTU of underlying real device is changed, propogate up to macvlan
pseudo devices.

Signed-off-by: Stephen Hemminger <shemminger@...tta.com>


--- a/drivers/net/macvlan.c	2008-10-29 09:53:00.000000000 -0700
+++ b/drivers/net/macvlan.c	2008-10-29 12:58:40.000000000 -0700
@@ -537,6 +537,19 @@ static int macvlan_device_event(struct n
 		list_for_each_entry_safe(vlan, next, &port->vlans, list)
 			macvlan_dellink(vlan->dev);
 		break;
+	case NETDEV_CHANGEMTU:
+		list_for_each_entry(vlan, &port->vlans, list) {
+			int err, oldmtu = vlan->dev->mtu;
+
+			err = dev_set_mtu(vlan->dev, dev->mtu);
+			if (err) {
+				list_for_each_entry_continue_reverse(vlan,
+								     &port->vlans,
+								     list)
+					dev_set_mtu(vlan->dev, oldmtu);
+				return notifier_from_errno(err);
+			}
+		}
 	}
 	return NOTIFY_DONE;
 }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ