Commit ffa6f571 authored by Colin Ian King's avatar Colin Ian King Committed by Steffen Klassert

esp6: fix incorrect null pointer check on xo

The check for xo being null is incorrect, currently it is checking
for non-null, it should be checking for null.

Detected with CoverityScan, CID#1429349 ("Dereference after null check")

Fixes: 7862b405 ("esp: Add gso handlers for esp4 and esp6")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent bcd1f8a4
...@@ -120,7 +120,7 @@ static struct sk_buff *esp6_gso_segment(struct sk_buff *skb, ...@@ -120,7 +120,7 @@ static struct sk_buff *esp6_gso_segment(struct sk_buff *skb,
netdev_features_t esp_features = features; netdev_features_t esp_features = features;
struct xfrm_offload *xo = xfrm_offload(skb); struct xfrm_offload *xo = xfrm_offload(skb);
if (xo) if (!xo)
goto out; goto out;
seq = xo->seq.low; seq = xo->seq.low;
......
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