]> www.infradead.org Git - users/dwmw2/linux.git/commit
ipv6: Select fragment id during UFO segmentation if not set.
authorVlad Yasevich <vyasevich@gmail.com>
Tue, 3 Feb 2015 21:36:15 +0000 (16:36 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Aug 2019 11:39:29 +0000 (12:39 +0100)
commit2e095ca0c58515774e6dd45f1f698682c073237f
treecb6c7278996ac4758ecfedf505bd53cc778d1505
parent05f4b670242e2b27c95d6eca88ac1fbf79c27a56
ipv6: Select fragment id during UFO segmentation if not set.

commit 0508c07f5e0c94f38afd5434e8b2a55b84553077 upstream.

If the IPv6 fragment id has not been set and we perform
fragmentation due to UFO, select a new fragment id.
We now consider a fragment id of 0 as unset and if id selection
process returns 0 (after all the pertrubations), we set it to
0x80000000, thus giving us ample space not to create collisions
with the next packet we may have to fragment.

When doing UFO integrity checking, we also select the
fragment id if it has not be set yet.   This is stored into
the skb_shinfo() thus allowing UFO to function correclty.

This patch also removes duplicate fragment id generation code
and moves ipv6_select_ident() into the header as it may be
used during GSO.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/net/ipv6.h
net/ipv6/ip6_output.c
net/ipv6/output_core.c
net/ipv6/udp_offload.c