geneve: testing the wrong variable in geneve6_build_skb()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 19 Apr 2016 14:30:56 +0000 (17:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Apr 2016 18:08:00 +0000 (14:08 -0400)
We intended to test "err" and not "skb".

Fixes: aed069df099c ('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>
drivers/net/geneve.c

index efbc7ceedc3a13b85c20d008f09627dc89e78619..512dbe01371352f88dc6138191f1ecf693bfbc61 100644 (file)
@@ -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);