diff options
| author | Sabrina Dubroca <[email protected]> | 2022-11-24 14:43:43 +0000 |
|---|---|---|
| committer | Steffen Klassert <[email protected]> | 2022-11-25 09:11:42 +0000 |
| commit | c2dad11e0466a27d40041845cf63cdfb4fbd991f (patch) | |
| tree | 66024b182091a68cb04ea4c33e7d76e61f9fc20a /net/xfrm/xfrm_user.c | |
| parent | xfrm: add extack to xfrm_do_migrate (diff) | |
| download | kernel-c2dad11e0466a27d40041845cf63cdfb4fbd991f.tar.gz kernel-c2dad11e0466a27d40041845cf63cdfb4fbd991f.zip | |
xfrm: add extack to xfrm_alloc_userspi
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
| -rw-r--r-- | net/xfrm/xfrm_user.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index c5d6a92d73cb..5c280e04e02c 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1523,7 +1523,7 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, u32 if_id = 0; p = nlmsg_data(nlh); - err = verify_spi_info(p->info.id.proto, p->min, p->max); + err = verify_spi_info(p->info.id.proto, p->min, p->max, extack); if (err) goto out_noput; @@ -1551,10 +1551,12 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, &p->info.saddr, 1, family); err = -ENOENT; - if (!x) + if (!x) { + NL_SET_ERR_MSG(extack, "Target ACQUIRE not found"); goto out_noput; + } - err = xfrm_alloc_spi(x, p->min, p->max); + err = xfrm_alloc_spi(x, p->min, p->max, extack); if (err) goto out; |
