summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_device.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-06-26 05:29:51 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-26 05:29:51 +0300
commit7bed14551659875e1cd23a7c0266394a29a773b3 (patch)
tree2bbd8b1b2b1610d2e48a71bf7bb5f41ac5e1d0ef /net/xfrm/xfrm_device.c
parentb8392808eb3fc28e523e28cb258c81ca246deb9b (diff)
parent4a21185cda0fbb860580eeeb4f1a70a9cda332a4 (diff)
downloadlinux-7bed14551659875e1cd23a7c0266394a29a773b3.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor overlapping changes in xfrm_device.c, between the double ESP trailing bug fix setting the XFRM_INIT flag and the changes in net-next preparing for bonding encryption support. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_device.c')
-rw-r--r--net/xfrm/xfrm_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
index 7b64bb64c822..edf11893dbe8 100644
--- a/net/xfrm/xfrm_device.c
+++ b/net/xfrm/xfrm_device.c
@@ -109,7 +109,7 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur
struct net_device *dev = skb->dev;
struct sec_path *sp;
- if (!xo)
+ if (!xo || (xo->flags & XFRM_XMIT))
return skb;
if (!(features & NETIF_F_HW_ESP))
@@ -134,6 +134,8 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur
return skb;
}
+ xo->flags |= XFRM_XMIT;
+
if (skb_is_gso(skb) && unlikely(x->xso.dev != dev)) {
struct sk_buff *segs;