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]
Message-ID: <20140513122906.GD2910@minipsycho.orion>
Date:	Tue, 13 May 2014 14:29:06 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Ding Tianhong <dingtianhong@...wei.com>
Cc:	Patrick McHardy <kaber@...sh.net>,
	"David S. Miller" <davem@...emloft.net>,
	Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] macvlan: Propagate lowerdev MTU changes

Tue, May 13, 2014 at 08:39:27AM CEST, dingtianhong@...wei.com wrote:
>When the physical MTU changes we should ensure that all existing MACVLAN
>dev MTU do not exceed the new lowerdev MTU. This patch adds that
>propagation.
>
>Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
>---
> drivers/net/macvlan.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
>index f0118d1..e03707d 100644
>--- a/drivers/net/macvlan.c
>+++ b/drivers/net/macvlan.c
>@@ -1091,6 +1091,13 @@ static int macvlan_device_event(struct notifier_block *unused,
> 			netdev_update_features(vlan->dev);
> 		}
> 		break;
>+	case NETDEV_CHANGEMTU:
>+		list_for_each_entry(vlan, &port->vlans, list) {
>+			if (vlan->dev->mtu <= dev->mtu)
>+				continue;
>+			dev_set_mtu(vlan->dev, dev->mtu);
>+		}
>+		break;
> 	case NETDEV_UNREGISTER:
> 		/* twiddle thumbs on netns device moves */
> 		if (dev->reg_state != NETREG_UNREGISTERING)
>-- 
>1.8.0

Reviewed-by: Jiri Pirko <jiri@...nulli.us>

--
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