提交 8e199dfd 编写于 作者: S Sabrina Dubroca 提交者: David S. Miller

ipv6: call ipv6_proxy_select_ident instead of ipv6_select_ident in udp6_ufo_fragment

Matt Grant reported frequent crashes in ipv6_select_ident when
udp6_ufo_fragment is called from openvswitch on a skb that doesn't
have a dst_entry set.

ipv6_proxy_select_ident generates the frag_id without using the dst
associated with the skb.  This approach was suggested by Vladislav
Yasevich.

Fixes: 0508c07f ("ipv6: Select fragment id during UFO segmentation if not set.")
Cc: Vladislav Yasevich <vyasevic@redhat.com>
Reported-by: NMatt Grant <matt@mattgrant.net.nz>
Tested-by: NMatt Grant <matt@mattgrant.net.nz>
Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
Acked-by: NVladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b314acac
...@@ -112,11 +112,9 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, ...@@ -112,11 +112,9 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
fptr = (struct frag_hdr *)(skb_network_header(skb) + unfrag_ip6hlen); fptr = (struct frag_hdr *)(skb_network_header(skb) + unfrag_ip6hlen);
fptr->nexthdr = nexthdr; fptr->nexthdr = nexthdr;
fptr->reserved = 0; fptr->reserved = 0;
if (skb_shinfo(skb)->ip6_frag_id) if (!skb_shinfo(skb)->ip6_frag_id)
fptr->identification = skb_shinfo(skb)->ip6_frag_id; ipv6_proxy_select_ident(skb);
else fptr->identification = skb_shinfo(skb)->ip6_frag_id;
ipv6_select_ident(fptr,
(struct rt6_info *)skb_dst(skb));
/* Fragment the skb. ipv6 header and the remaining fields of the /* Fragment the skb. ipv6 header and the remaining fields of the
* fragment header are updated in ipv6_gso_segment() * fragment header are updated in ipv6_gso_segment()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册