]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: fix IFLA_MTU ignored on NEWLINK
authorXin Long <lucien.xin@gmail.com>
Thu, 21 Jun 2018 04:56:04 +0000 (12:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jun 2018 05:57:46 +0000 (14:57 +0900)
commitff4782366e46a8b35ca8a8635bd0e22a828358c6
treeeaa309fd4d8b6168307d6e3f5e0d3f2199e35e50
parentb3bf0b21ad4ff761a1f4e211b8a204b514f5cab4
ipvlan: fix IFLA_MTU ignored on NEWLINK

Commit ea0e8a59d393 ("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: ea0e8a59d393 ("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>
drivers/net/ipvlan/ipvlan_main.c