Message ID | 20231017083723.1364940-6-steffen.klassert@secunet.com (mailing list archive) |
---|---|
State | Accepted |
Commit | dad4e491e30b20f4dc615c9da65d2142d703b5c2 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/7] net: xfrm: skip policies marked as dead while reinserting policies | expand |
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index fddd0cbdede1..e023d29e919c 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -770,7 +770,9 @@ static inline int esp_remove_trailer(struct sk_buff *skb) skb->csum = csum_block_sub(skb->csum, csumdiff, skb->len - trimlen); } - pskb_trim(skb, skb->len - trimlen); + ret = pskb_trim(skb, skb->len - trimlen); + if (unlikely(ret)) + return ret; ret = nexthdr[1];