aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNeal Cardwell <ncardwell@google.com>2012-04-22 05:45:47 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-05-01 06:00:23 -0400
commit9818440d2e455f3f5dacd1ff642e5911c2bb1813 (patch)
tree73fd539d25b2a8801808e8b857839014145abfea /net
parentbdc9b19909f4fafa1a594a12bde49411f8626b66 (diff)
tcp: fix TCP_MAXSEG for established IPv6 passive sockets
BugLink: http://bugs.launchpad.net/bugs/990544 [ Upstream commit d135c522f1234f62e81be29cebdf59e9955139ad ] Commit f5fff5d forgot to fix TCP_MAXSEG behavior IPv6 sockets, so IPv6 TCP server sockets that used TCP_MAXSEG would find that the advmss of child sockets would be incorrect. This commit mirrors the advmss logic from tcp_v4_syn_recv_sock in tcp_v6_syn_recv_sock. Eventually this logic should probably be shared between IPv4 and IPv6, but this at least fixes this issue. Signed-off-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/tcp_ipv6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 51587a01627..848f9634bbd 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1514,6 +1514,10 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1514 tcp_mtup_init(newsk); 1514 tcp_mtup_init(newsk);
1515 tcp_sync_mss(newsk, dst_mtu(dst)); 1515 tcp_sync_mss(newsk, dst_mtu(dst));
1516 newtp->advmss = dst_metric_advmss(dst); 1516 newtp->advmss = dst_metric_advmss(dst);
1517 if (tcp_sk(sk)->rx_opt.user_mss &&
1518 tcp_sk(sk)->rx_opt.user_mss < newtp->advmss)
1519 newtp->advmss = tcp_sk(sk)->rx_opt.user_mss;
1520
1517 tcp_initialize_rcv_mss(newsk); 1521 tcp_initialize_rcv_mss(newsk);
1518 1522
1519 newinet->inet_daddr = newinet->inet_saddr = LOOPBACK4_IPV6; 1523 newinet->inet_daddr = newinet->inet_saddr = LOOPBACK4_IPV6;