diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2022-11-24 15:43:39 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2022-11-25 10:11:39 +0100 |
commit | a25b19f36f921b90bcb826c80b568266b8ad40a4 (patch) | |
tree | 5ffa6f692f74d058b9f8aa7dd58ff1b044e9c1fa /net/xfrm/xfrm_user.c | |
parent | f157c416c51ab8b7f5e833dfde8ace3a6325c19a (diff) | |
download | linux-a25b19f36f921b90bcb826c80b568266b8ad40a4.tar.bz2 |
xfrm: add extack to xfrm_add_sa_expire
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |