Commit 1ba64fac authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarAlexander Duyck <aduyck@mirantis.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9375729
...@@ -733,7 +733,7 @@ static int geneve6_build_skb(struct dst_entry *dst, struct sk_buff *skb, ...@@ -733,7 +733,7 @@ static int geneve6_build_skb(struct dst_entry *dst, struct sk_buff *skb,
goto free_dst; goto free_dst;
err = udp_tunnel_handle_offloads(skb, udp_sum); err = udp_tunnel_handle_offloads(skb, udp_sum);
if (IS_ERR(skb)) if (err)
goto free_dst; goto free_dst;
gnvh = (struct genevehdr *)__skb_push(skb, sizeof(*gnvh) + opt_len); gnvh = (struct genevehdr *)__skb_push(skb, sizeof(*gnvh) + opt_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment