]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Revert "use core MTU range checking in misc drivers"
authorSven Eckelmann <sven@narfation.org>
Sat, 22 Oct 2016 07:46:24 +0000 (09:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2016 21:19:07 +0000 (17:19 -0400)
commit1a44ef49ad6f452f3daac7914d7de1eacd13878f
tree3468d1344b1e14378d18985af926817ea0b78951
parent564afd531f33c08a9f21712c7478ff79a3a9e034
batman-adv: Revert "use core MTU range checking in misc drivers"

The maximum MTU is defined via the slave devices of an batman-adv
interface. Thus it is not possible to calculate the max_mtu during the
creation of the batman-adv device when no slave devices are attached. Doing
so would for example break non-fragmentation setups which then
(incorrectly) allow an MTU of 1500 even when underlying device cannot
transport 1500 bytes + batman-adv headers.

Checking the dynamically calculated max_mtu via the minimum of the slave
devices MTU during .ndo_change_mtu is also used by the bridge interface.

Cc: Jarod Wilson <jarod@redhat.com>
Fixes: ba102c088c94 ("net: use core MTU range checking in misc drivers")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/batman-adv/soft-interface.c