diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 59792d283ff8..b5ea036ca781 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2381,9 +2381,10 @@ static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int l | |||
2381 | return 0; | 2381 | return 0; |
2382 | } | 2382 | } |
2383 | 2383 | ||
2384 | static int tcp_repair_options_est(struct tcp_sock *tp, | 2384 | static int tcp_repair_options_est(struct sock *sk, |
2385 | struct tcp_repair_opt __user *optbuf, unsigned int len) | 2385 | struct tcp_repair_opt __user *optbuf, unsigned int len) |
2386 | { | 2386 | { |
2387 | struct tcp_sock *tp = tcp_sk(sk); | ||
2387 | struct tcp_repair_opt opt; | 2388 | struct tcp_repair_opt opt; |
2388 | 2389 | ||
2389 | while (len >= sizeof(opt)) { | 2390 | while (len >= sizeof(opt)) { |
@@ -2396,6 +2397,7 @@ static int tcp_repair_options_est(struct tcp_sock *tp, | |||
2396 | switch (opt.opt_code) { | 2397 | switch (opt.opt_code) { |
2397 | case TCPOPT_MSS: | 2398 | case TCPOPT_MSS: |
2398 | tp->rx_opt.mss_clamp = opt.opt_val; | 2399 | tp->rx_opt.mss_clamp = opt.opt_val; |
2400 | tcp_mtup_init(sk); | ||
2399 | break; | 2401 | break; |
2400 | case TCPOPT_WINDOW: | 2402 | case TCPOPT_WINDOW: |
2401 | { | 2403 | { |
@@ -2555,7 +2557,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2555 | if (!tp->repair) | 2557 | if (!tp->repair) |
2556 | err = -EINVAL; | 2558 | err = -EINVAL; |
2557 | else if (sk->sk_state == TCP_ESTABLISHED) | 2559 | else if (sk->sk_state == TCP_ESTABLISHED) |
2558 | err = tcp_repair_options_est(tp, | 2560 | err = tcp_repair_options_est(sk, |
2559 | (struct tcp_repair_opt __user *)optval, | 2561 | (struct tcp_repair_opt __user *)optval, |
2560 | optlen); | 2562 | optlen); |
2561 | else | 2563 | else |