OSDN Git Service

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:04:54 +0000 (10:04 +0100)
commitfbdf477fcff6b16869665cbf7a38c1b6dbfe0d8a
tree336ac8245bd1685027437878984a1af077cb2542
parent7edb2d2d86808c05ea75f4269c41bcc775988b08
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