[NET] gso: Fix GSO feature mask in sk_setup_caps

This isn't a bug just yet as only TCP uses sk_setup_caps for GSO.
However, if and when UDP or something else starts using it this is
likely to cause a problem if we forget to add software emulation
for it at the same time.

The problem is that right now we translate GSO emulation to the
bitmask NETIF_F_GSO_MASK, which includes every protocol, even
ones that we cannot emulate.

This patch makes it provide only the ones that we can emulate.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Herbert Xu and committed by David S. Miller 4fcd6b99 6418204f

+1 -1
+1 -1
net/core/sock.c
··· 998 998 __sk_dst_set(sk, dst); 999 999 sk->sk_route_caps = dst->dev->features; 1000 1000 if (sk->sk_route_caps & NETIF_F_GSO) 1001 - sk->sk_route_caps |= NETIF_F_GSO_MASK; 1001 + sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE; 1002 1002 if (sk_can_gso(sk)) { 1003 1003 if (dst->header_len) 1004 1004 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;