diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 9e041fa5c545..cd426313a298 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -943,9 +943,11 @@ static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst, | |||
943 | if (skb) { | 943 | if (skb) { |
944 | __tcp_v4_send_check(skb, ireq->ir_loc_addr, ireq->ir_rmt_addr); | 944 | __tcp_v4_send_check(skb, ireq->ir_loc_addr, ireq->ir_rmt_addr); |
945 | 945 | ||
946 | rcu_read_lock(); | ||
946 | err = ip_build_and_send_pkt(skb, sk, ireq->ir_loc_addr, | 947 | err = ip_build_and_send_pkt(skb, sk, ireq->ir_loc_addr, |
947 | ireq->ir_rmt_addr, | 948 | ireq->ir_rmt_addr, |
948 | ireq_opt_deref(ireq)); | 949 | rcu_dereference(ireq->ireq_opt)); |
950 | rcu_read_unlock(); | ||
949 | err = net_xmit_eval(err); | 951 | err = net_xmit_eval(err); |
950 | } | 952 | } |
951 | 953 | ||
@@ -2517,6 +2519,12 @@ static int __net_init tcp_sk_init(struct net *net) | |||
2517 | if (res) | 2519 | if (res) |
2518 | goto fail; | 2520 | goto fail; |
2519 | sock_set_flag(sk, SOCK_USE_WRITE_QUEUE); | 2521 | sock_set_flag(sk, SOCK_USE_WRITE_QUEUE); |
2522 | |||
2523 | /* Please enforce IP_DF and IPID==0 for RST and | ||
2524 | * ACK sent in SYN-RECV and TIME-WAIT state. | ||
2525 | */ | ||
2526 | inet_sk(sk)->pmtudisc = IP_PMTUDISC_DO; | ||
2527 | |||
2520 | *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk; | 2528 | *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk; |
2521 | } | 2529 | } |
2522 | 2530 | ||