Merge tag 'ipsec-2023-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/klasser...
[linux-2.6-microblaze.git] / net / xfrm / xfrm_device.c
index e2ca50b..408f5e5 100644 (file)
@@ -287,7 +287,7 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
                return (is_packet_offload) ? -EINVAL : 0;
        }
 
-       if (x->props.flags & XFRM_STATE_ESN &&
+       if (!is_packet_offload && x->props.flags & XFRM_STATE_ESN &&
            !dev->xfrmdev_ops->xdo_dev_state_advance_esn) {
                NL_SET_ERR_MSG(extack, "Device doesn't support offload with ESN");
                xso->dev = NULL;