提交 1ba64fac 编写于 作者: D Dan Carpenter 提交者: David S. Miller

geneve: testing the wrong variable in geneve6_build_skb()

We intended to test "err" and not "skb".

Fixes: aed069df ('ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NAlexander Duyck <aduyck@mirantis.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f9375729
......@@ -733,7 +733,7 @@ static int geneve6_build_skb(struct dst_entry *dst, struct sk_buff *skb,
goto free_dst;
err = udp_tunnel_handle_offloads(skb, udp_sum);
if (IS_ERR(skb))
if (err)
goto free_dst;
gnvh = (struct genevehdr *)__skb_push(skb, sizeof(*gnvh) + opt_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册