diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-06-01 01:15:50 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-06-03 21:08:49 -0400 |
commit | 4fcd6b991685493185c2bb8a76b21aadb658bd76 (patch) | |
tree | ee131eba969a9c9984b6c884a6a3d2f3bfadcffb /net/core | |
parent | 6418204f919c030ca0c943f6c77dc84aff2ec0d2 (diff) |
[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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 7e51d3a5e4f6..c14ce0198d25 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -998,7 +998,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) | |||
998 | __sk_dst_set(sk, dst); | 998 | __sk_dst_set(sk, dst); |
999 | sk->sk_route_caps = dst->dev->features; | 999 | sk->sk_route_caps = dst->dev->features; |
1000 | if (sk->sk_route_caps & NETIF_F_GSO) | 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 | if (sk_can_gso(sk)) { | 1002 | if (sk_can_gso(sk)) { |
1003 | if (dst->header_len) | 1003 | if (dst->header_len) |
1004 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | 1004 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; |