mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
ipvlan: fix IFLA_MTU ignored on NEWLINK
[ Upstream commit30877961b1] Commit296d485680("ipvlan: inherit MTU from master device") adjusted the mtu from the master device when creating a ipvlan device, but it would also override the mtu value set in rtnl_create_link. It causes IFLA_MTU param not to take effect. So this patch is to not adjust the mtu if IFLA_MTU param is set when creating a ipvlan device. Fixes:296d485680("ipvlan: inherit MTU from master device") Reported-by: Jianlin Shi <jishi@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d10c0baaae
commit
f5a42d63f0
@@ -546,7 +546,8 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev,
|
||||
ipvlan->dev = dev;
|
||||
ipvlan->port = port;
|
||||
ipvlan->sfeatures = IPVLAN_FEATURES;
|
||||
ipvlan_adjust_mtu(ipvlan, phy_dev);
|
||||
if (!tb[IFLA_MTU])
|
||||
ipvlan_adjust_mtu(ipvlan, phy_dev);
|
||||
INIT_LIST_HEAD(&ipvlan->addrs);
|
||||
|
||||
/* If the port-id base is at the MAX value, then wrap it around and
|
||||
|
||||
Reference in New Issue
Block a user