diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2022-09-27 17:45:33 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2022-09-29 07:18:00 +0200 |
commit | 6ee55320520e31f5dae637e928d5792352b22776 (patch) | |
tree | 6dcc22ae61a18048244696d464f7baf68b6aad10 /net/ipv6/ipcomp6.c | |
parent | xfrm: tunnel: add extack to ipip_init_state, xfrm6_tunnel_init_state (diff) | |
download | linux-6ee55320520e31f5dae637e928d5792352b22776.tar.xz linux-6ee55320520e31f5dae637e928d5792352b22776.zip |
xfrm: ipcomp: add extack to ipcomp{4,6}_init_state
And the shared helper ipcomp_init_state.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 7e47009739e9..72d4858dec18 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c @@ -149,17 +149,20 @@ static int ipcomp6_init_state(struct xfrm_state *x, x->props.header_len += sizeof(struct ipv6hdr); break; default: + NL_SET_ERR_MSG(extack, "Unsupported XFRM mode for IPcomp"); goto out; } - err = ipcomp_init_state(x); + err = ipcomp_init_state(x, extack); if (err) goto out; if (x->props.mode == XFRM_MODE_TUNNEL) { err = ipcomp6_tunnel_attach(x); - if (err) + if (err) { + NL_SET_ERR_MSG(extack, "Kernel error: failed to initialize the associated state"); goto out; + } } err = 0; |