]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/tcp_ipv6.c
tcp: make sysctl_tcp_ecn namespace aware
[karo-tx-linux.git] / net / ipv6 / tcp_ipv6.c
index 6565cf55eb1e80f9109502995319655147bd1fd7..3164ad272a74411661930ec19309af14589347c1 100644 (file)
@@ -1027,7 +1027,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
        treq->rmt_addr = ipv6_hdr(skb)->saddr;
        treq->loc_addr = ipv6_hdr(skb)->daddr;
        if (!want_cookie || tmp_opt.tstamp_ok)
-               TCP_ECN_create_request(req, skb);
+               TCP_ECN_create_request(req, skb, sock_net(sk));
 
        treq->iif = sk->sk_bound_dev_if;
 
@@ -1288,7 +1288,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
 #endif
 
        if (__inet_inherit_port(sk, newsk) < 0) {
-               sock_put(newsk);
+               inet_csk_prepare_forced_close(newsk);
+               tcp_done(newsk);
                goto out;
        }
        __inet6_hash(newsk, NULL);