Skip to content

Commit a10fb4a

Browse files
Mike Yuklassert
authored andcommitted
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: Mike Yu <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent f7e8542 commit a10fb4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/xfrm/xfrm_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
261261

262262
is_packet_offload = xuo->flags & XFRM_OFFLOAD_PACKET;
263263

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

0 commit comments

Comments
 (0)