Commit a10fb4a8 authored by Mike Yu's avatar Mike Yu Committed by Steffen Klassert
Browse files

xfrm: Allow UDP encapsulation in crypto offload control path



Unblock this limitation so that SAs with encapsulation specified
can be passed to HW drivers. HW drivers can still reject the SA
in their implementation of xdo_dev_state_add if the encapsulation
is not supported.

Test: Verified on Android device
Signed-off-by: default avatarMike Yu <yumike@google.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent f7e8542d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -261,9 +261,9 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,

	is_packet_offload = xuo->flags & XFRM_OFFLOAD_PACKET;

	/* We don't yet support UDP encapsulation and TFC padding. */
	if ((!is_packet_offload && x->encap) || x->tfcpad) {
		NL_SET_ERR_MSG(extack, "Encapsulation and TFC padding can't be offloaded");
	/* We don't yet support TFC padding. */
	if (x->tfcpad) {
		NL_SET_ERR_MSG(extack, "TFC padding can't be offloaded");
		return -EINVAL;
	}