Message ID | 20221126110303.1859238-6-steffen.klassert@secunet.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a25b19f36f921b90bcb826c80b568266b8ad40a4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [01/10] esp6: remove redundant variable err | expand |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 25de6e8faf8d..1664baefae80 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -2584,8 +2584,11 @@ static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh, spin_lock_bh(&x->lock); err = -EINVAL; - if (x->km.state != XFRM_STATE_VALID) + if (x->km.state != XFRM_STATE_VALID) { + NL_SET_ERR_MSG(extack, "SA must be in VALID state"); goto out; + } + km_state_expired(x, ue->hard, nlh->nlmsg_pid); if (ue->hard) {