Skip to content

Commit

Permalink
xfrm: add extack to xfrm_add_sa_expire
Browse files Browse the repository at this point in the history
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
Sabrina Dubroca authored and Steffen Klassert committed Nov 25, 2022
1 parent f157c41 commit a25b19f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a25b19f

Please sign in to comment.