[SRU][Bionic][PATCH 0/1] Cannot create ipvlans with > 1500 MTU on recent Bionic kernels

Nivedita Singhvi nivedita.singhvi at canonical.com
Thu May 21 06:44:01 UTC 2020


BugLink: https://bugs.launchpad.net/bugs/1879658

[IMPACT]

Setting an MTU larger than the default 1500 results in an
error on the recent (4.15.0-92+) Bionic / Xenial -hwe kernels
when attempting to create ipvlan interfaces:

# ip link add test0 mtu 9000 link eno1 type ipvlan mode l2
RTNETLINK answers: Invalid argument

This breaks Docker and other applications which use a Jumbo
MTU (9000) when using ipvlans.

Breaking commit:
-------------------
B: bionic/linux: 4.15.0-92.93
X-hwe: Ubuntu-hwe-4.15.0-92.93~16.04.1

* Bionic update: upstream stable patchset 2020-02-21 (LP: #1864261)
  * net: rtnetlink: validate IFLA_MTU attribute in rtnl_create_link()

The above patch started enforcing strict range limits for MTU
and subsequently exposed some latent bugs in previous commits.
This fixes the breakage in the rtnetlink path, previously fixes
went into bonding, teaming drivers for the same issue. 

The mtu checking consolidation had gone into the kernel in the past
but the max MTU was not actually set so defaulted to 1500.


Fix commit:
--------------
This has been fixed in upstream mainline:

ipvlan: use ETH_MAX_MTU as max mtu
commit 548feb33c598dfaf9f8e066b842441ac49b84a8a

Which went in v4.18-rc2 so is already present in all Cosmic onwards
kernels. 

So this is only affects Bionic and Xenial -hwe kernels
4.15.0-92 onwards.


[Test Case]

On 4.15.0-92+ kernel creating a ipvlan interface of > 1500 results
in error:

# ip link add test1 mtu 9000 link eno1 type ipvlan mode l2
RTNETLINK answers: Invalid argument

Patched kernels have been tested in our lab and in the process
of being tested at enterprise users.

[Regression Potential]
Small as fix is very small, isolated to ipvlan driver and already
in Cosmic onwards kernels. 


Xin Long (1):
  ipvlan: use ETH_MAX_MTU as max mtu

 drivers/net/ipvlan/ipvlan_main.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.17.1




More information about the kernel-team mailing list