diff options
author | William Allen Simpson <william.allen.simpson@gmail.com> | 2009-11-10 04:51:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-13 23:38:48 -0500 |
commit | bee7ca9ec03a26676ea2b1c28dc4039348eff3e1 (patch) | |
tree | 652832d73252d7c9ede928a4242763f570070b0e /net/ipv4/tcp_ipv4.c | |
parent | cbbef5e183079455763fc470ccf69008f92ab4b6 (diff) |
net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
Define two symbols needed in both kernel and user space.
Remove old (somewhat incorrect) kernel variant that wasn't used in
most cases. Default should apply to both RMSS and SMSS (RFC2581).
Replace numeric constants with defined symbols.
Stand-alone patch, originally developed for TCPCT.
Signed-off-by: William.Allen.Simpson@gmail.com
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 657ae334f125..cf7f2086e6e0 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -217,7 +217,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
217 | if (inet->opt) | 217 | if (inet->opt) |
218 | inet_csk(sk)->icsk_ext_hdr_len = inet->opt->optlen; | 218 | inet_csk(sk)->icsk_ext_hdr_len = inet->opt->optlen; |
219 | 219 | ||
220 | tp->rx_opt.mss_clamp = 536; | 220 | tp->rx_opt.mss_clamp = TCP_MSS_DEFAULT; |
221 | 221 | ||
222 | /* Socket identity is still unknown (sport may be zero). | 222 | /* Socket identity is still unknown (sport may be zero). |
223 | * However we set state to SYN-SENT and not releasing socket | 223 | * However we set state to SYN-SENT and not releasing socket |
@@ -1268,7 +1268,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1268 | goto drop_and_free; | 1268 | goto drop_and_free; |
1269 | 1269 | ||
1270 | tcp_clear_options(&tmp_opt); | 1270 | tcp_clear_options(&tmp_opt); |
1271 | tmp_opt.mss_clamp = 536; | 1271 | tmp_opt.mss_clamp = TCP_MSS_DEFAULT; |
1272 | tmp_opt.user_mss = tcp_sk(sk)->rx_opt.user_mss; | 1272 | tmp_opt.user_mss = tcp_sk(sk)->rx_opt.user_mss; |
1273 | 1273 | ||
1274 | tcp_parse_options(skb, &tmp_opt, 0, dst); | 1274 | tcp_parse_options(skb, &tmp_opt, 0, dst); |
@@ -1815,7 +1815,7 @@ static int tcp_v4_init_sock(struct sock *sk) | |||
1815 | */ | 1815 | */ |
1816 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; | 1816 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; |
1817 | tp->snd_cwnd_clamp = ~0; | 1817 | tp->snd_cwnd_clamp = ~0; |
1818 | tp->mss_cache = 536; | 1818 | tp->mss_cache = TCP_MSS_DEFAULT; |
1819 | 1819 | ||
1820 | tp->reordering = sysctl_tcp_reordering; | 1820 | tp->reordering = sysctl_tcp_reordering; |
1821 | icsk->icsk_ca_ops = &tcp_init_congestion_ops; | 1821 | icsk->icsk_ca_ops = &tcp_init_congestion_ops; |