diff options
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
| -rw-r--r-- | net/ipv4/tcp_minisocks.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 63d6311b5365..17e7339ee5ca 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
| @@ -300,7 +300,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) | |||
| 300 | tw->tw_v6_daddr = sk->sk_v6_daddr; | 300 | tw->tw_v6_daddr = sk->sk_v6_daddr; |
| 301 | tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; | 301 | tw->tw_v6_rcv_saddr = sk->sk_v6_rcv_saddr; |
| 302 | tw->tw_tclass = np->tclass; | 302 | tw->tw_tclass = np->tclass; |
| 303 | tw->tw_flowlabel = np->flow_label >> 12; | 303 | tw->tw_flowlabel = be32_to_cpu(np->flow_label & IPV6_FLOWLABEL_MASK); |
| 304 | tw->tw_ipv6only = sk->sk_ipv6only; | 304 | tw->tw_ipv6only = sk->sk_ipv6only; |
| 305 | } | 305 | } |
| 306 | #endif | 306 | #endif |
| @@ -420,7 +420,10 @@ void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst) | |||
| 420 | rcu_read_unlock(); | 420 | rcu_read_unlock(); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | if (!ca_got_dst && !try_module_get(icsk->icsk_ca_ops->owner)) | 423 | /* If no valid choice made yet, assign current system default ca. */ |
| 424 | if (!ca_got_dst && | ||
| 425 | (!icsk->icsk_ca_setsockopt || | ||
| 426 | !try_module_get(icsk->icsk_ca_ops->owner))) | ||
| 424 | tcp_assign_congestion_control(sk); | 427 | tcp_assign_congestion_control(sk); |
| 425 | 428 | ||
| 426 | tcp_set_ca_state(sk, TCP_CA_Open); | 429 | tcp_set_ca_state(sk, TCP_CA_Open); |
| @@ -755,10 +758,11 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb, | |||
| 755 | if (!child) | 758 | if (!child) |
| 756 | goto listen_overflow; | 759 | goto listen_overflow; |
| 757 | 760 | ||
| 758 | inet_csk_reqsk_queue_unlink(sk, req); | 761 | inet_csk_reqsk_queue_drop(sk, req); |
| 759 | inet_csk_reqsk_queue_removed(sk, req); | ||
| 760 | |||
| 761 | inet_csk_reqsk_queue_add(sk, req, child); | 762 | inet_csk_reqsk_queue_add(sk, req, child); |
| 763 | /* Warning: caller must not call reqsk_put(req); | ||
| 764 | * child stole last reference on it. | ||
| 765 | */ | ||
| 762 | return child; | 766 | return child; |
| 763 | 767 | ||
| 764 | listen_overflow: | 768 | listen_overflow: |
