Skip to content

Commit

Permalink
geneve: testing the wrong variable in geneve6_build_skb()
Browse files Browse the repository at this point in the history
We intended to test "err" and not "skb".

Fixes: aed069d ('ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 21, 2016
1 parent f937572 commit 1ba64fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1ba64fa

Please sign in to comment.