mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
net: Introduce sk_route_nocaps
TCP-MD5 sessions have intermittent failures, when route cache is invalidated. ip_queue_xmit() has to find a new route, calls sk_setup_caps(sk, &rt->u.dst), destroying the sk->sk_route_caps &= ~NETIF_F_GSO_MASK that MD5 desperately try to make all over its way (from tcp_transmit_skb() for example) So we send few bad packets, and everything is fine when tcp_transmit_skb() is called again for this socket. Since ip_queue_xmit() is at a lower level than TCP-MD5, I chose to use a socket field, sk_route_nocaps, containing bits to mask on sk_route_caps. Reported-by: Bhaskar Dutta <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3b098e2d7c
commit
a465419b1f
5 changed files with 15 additions and 6 deletions
|
|
@ -604,7 +604,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
|
|||
kfree(newkey);
|
||||
return -ENOMEM;
|
||||
}
|
||||
sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
|
||||
sk_nocaps_add(sk, NETIF_F_GSO_MASK);
|
||||
}
|
||||
if (tcp_alloc_md5sig_pool(sk) == NULL) {
|
||||
kfree(newkey);
|
||||
|
|
@ -741,7 +741,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval,
|
|||
return -ENOMEM;
|
||||
|
||||
tp->md5sig_info = p;
|
||||
sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
|
||||
sk_nocaps_add(sk, NETIF_F_GSO_MASK);
|
||||
}
|
||||
|
||||
newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue