Skip to content

Commit 65f079a

Browse files
qsnklassert
authored andcommitted
xfrm: bring back device check in validate_xmit_xfrm
This is partial revert of commit d53dda2. This change causes traffic using GSO with SW crypto running through a NIC capable of HW offload to no longer get segmented during validate_xmit_xfrm, and is unrelated to the bonding use case mentioned in the commit. Fixes: d53dda2 ("xfrm: Remove unneeded device check from validate_xmit_xfrm") Signed-off-by: Sabrina Dubroca <[email protected]> Reviewed-by: Cosmin Ratiu <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent 234d1ef commit 65f079a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/xfrm/xfrm_device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur
155155
return skb;
156156
}
157157

158-
if (skb_is_gso(skb) && unlikely(xmit_xfrm_check_overflow(skb))) {
158+
if (skb_is_gso(skb) && (unlikely(x->xso.dev != dev) ||
159+
unlikely(xmit_xfrm_check_overflow(skb)))) {
159160
struct sk_buff *segs;
160161

161162
/* Packet got rerouted, fixup features and segment it. */

0 commit comments

Comments
 (0)