]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: inherit MTU from master device
authorMahesh Bandewar <maheshb@google.com>
Thu, 28 Jan 2016 07:33:28 +0000 (23:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Feb 2016 00:18:53 +0000 (19:18 -0500)
commit5eb3fced1cfd6a903cd244125e988555c744dac1
tree84df4485b3ac2c52e3c2fda0fb4ece86427346f0
parentfbf5a6f3fe2377dd11aa928c664dceb6b670d5b1
ipvlan: inherit MTU from master device

When we create IPvlan slave; we use ether_setup() and that
sets up default MTU to 1500 while the master device may have
lower / different MTU. Any subsequent changes to the masters'
MTU are reflected into the slaves' MTU setting. However if those
don't happen (most likely scenario), the slaves' MTU stays at
1500 which could be bad.

This change adds code to inherit MTU from the master device
instead of using the default value during the link initialization
phase.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Tim Hockins <thockins@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c