]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfrm: add extack to xfrm_init_state
authorAntony Antony <antony.antony@secunet.com>
Tue, 26 May 2026 19:06:06 +0000 (21:06 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 4 Jun 2026 10:22:35 +0000 (12:22 +0200)
commit231a1744dc433e8f39871a8fd0f5eab78202e136
tree242fbc054ee64ba3fea40a09acc633b44c30f780
parent440bf355d32e14115b16d2869fc4e8e98e4a012a
xfrm: add extack to xfrm_init_state

Add a struct extack parameter to xfrm_init_state() and pass it
through to __xfrm_init_state(). This allows validation errors detected
during state initialization to propagate meaningful error messages back
to userspace.

xfrm_state_migrate() now passes extack so that errors from the
XFRM_MSG_MIGRATE_STATE path are properly reported. Callers without an
extack context (af_key, ipcomp4, ipcomp6) pass NULL, preserving their
existing behaviour.

Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/ipv4/ipcomp.c
net/ipv6/ipcomp6.c
net/key/af_key.c
net/xfrm/xfrm_state.c