netfilter: bridge: honor frag_max_size when refragmenting
authorFlorian Westphal <fw@strlen.de>
Thu, 9 Mar 2017 22:22:30 +0000 (23:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:20 +0000 (10:07 +0100)
commit97b75dad9dd1bc352e199d15516978edb06792fd
treeacdc66a9920fd8cab0918aa144aa04ee2fba3d66
parent38780b9ae45a40f0f39f0279c381397fb910b072
netfilter: bridge: honor frag_max_size when refragmenting

[ Upstream commit 4ca60d08cbe65f501baad64af50fceba79c19fbb ]

consider a bridge with mtu 9000, but end host sending smaller
packets to another host with mtu < 9000.

In this case, after reassembly, bridge+defrag would refragment,
and then attempt to send the reassembled packet as long as it
was below 9k.

Instead we have to cap by the largest fragment size seen.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_netfilter_hooks.c