diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index fc8acb15dcfb..5ce8b6c344b8 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -808,8 +808,7 @@ int esp6_input_done2(struct sk_buff *skb, int err) struct tcphdr *th; offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); - - if (offset < 0) { + if (offset == -1) { err = -EINVAL; goto out; }