]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: IP6 defrag: use rbtrees for IPv6 defrag
authorPeter Oskolkov <posk@google.com>
Tue, 23 Apr 2019 17:25:32 +0000 (10:25 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit447ce6240f20c330375f45620bea6d7d1f83fbb5
treea9f286022376636c0319b932a42f177d37cd4580
parentcf1b4a13434013a0777ba6fa52414175af13ce78
net: IP6 defrag: use rbtrees for IPv6 defrag

BugLink: https://bugs.launchpad.net/bugs/1838349
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ]

Currently, IPv6 defragmentation code drops non-last fragments that
are smaller than 1280 bytes: see
commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu")

This behavior is not specified in IPv6 RFCs and appears to break
compatibility with some IPv6 implemenations, as reported here:
https://www.spinics.net/lists/netdev/msg543846.html

This patch re-uses common IP defragmentation queueing and reassembly
code in IPv6, removing the 1280 byte restriction.

v2: change handling of overlaps to match that of upstream.

Signed-off-by: Peter Oskolkov <posk@google.com>
Reported-by: Tom Herbert <tom@herbertland.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/net/ipv6_frag.h
net/ipv6/reassembly.c