ipv6: Select fragment id during UFO segmentation if not set.
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>
This commit is contained in:

committed by
David S. Miller

parent
42b5212fee
commit
0508c07f5e
@@ -671,6 +671,9 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
|
||||
return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
|
||||
}
|
||||
|
||||
u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst,
|
||||
struct in6_addr *src);
|
||||
void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt);
|
||||
void ipv6_proxy_select_ident(struct sk_buff *skb);
|
||||
|
||||
int ip6_dst_hoplimit(struct dst_entry *dst);
|
||||
|
Reference in New Issue
Block a user