summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2017-08-01 12:49:10 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2017-08-02 11:45:48 +0200
commitf70f250a77313b542531e1ff7a449cd0ccd83ec0 (patch)
tree8a7a3e81f3343bfa8ddc1aafaa46ae94aa7e9bde /net
parent7e9e9202bccc3a8224ae10ad5d69cac8627f9c7b (diff)
net: Allow IPsec GSO for local sockets
This patch allows local sockets to make use of XFRM GSO code path. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 742f68c9c84a..564f835f408a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1757,7 +1757,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE;
sk->sk_route_caps &= ~sk->sk_route_nocaps;
if (sk_can_gso(sk)) {
- if (dst->header_len) {
+ if (dst->header_len && !xfrm_dst_offload_ok(dst)) {
sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
} else {
sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;