diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 4 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 19 |
2 files changed, 10 insertions, 13 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index d325a9958909..43f3993e1f30 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <net/inet6_hashtables.h> | 22 | #include <net/inet6_hashtables.h> |
23 | #include <net/ip.h> | 23 | #include <net/ip.h> |
24 | 24 | ||
25 | void __inet6_hash(struct inet_hashinfo *hashinfo, | 25 | void __inet6_hash(struct sock *sk) |
26 | struct sock *sk) | ||
27 | { | 26 | { |
27 | struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; | ||
28 | struct hlist_head *list; | 28 | struct hlist_head *list; |
29 | rwlock_t *lock; | 29 | rwlock_t *lock; |
30 | 30 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 59d0029e93a7..12750f2b05ab 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -86,12 +86,6 @@ static struct tcp_sock_af_ops tcp_sock_ipv6_specific; | |||
86 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; | 86 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | static int tcp_v6_get_port(struct sock *sk, unsigned short snum) | ||
90 | { | ||
91 | return inet_csk_get_port(&tcp_hashinfo, sk, snum, | ||
92 | inet6_csk_bind_conflict); | ||
93 | } | ||
94 | |||
95 | static void tcp_v6_hash(struct sock *sk) | 89 | static void tcp_v6_hash(struct sock *sk) |
96 | { | 90 | { |
97 | if (sk->sk_state != TCP_CLOSE) { | 91 | if (sk->sk_state != TCP_CLOSE) { |
@@ -100,7 +94,7 @@ static void tcp_v6_hash(struct sock *sk) | |||
100 | return; | 94 | return; |
101 | } | 95 | } |
102 | local_bh_disable(); | 96 | local_bh_disable(); |
103 | __inet6_hash(&tcp_hashinfo, sk); | 97 | __inet6_hash(sk); |
104 | local_bh_enable(); | 98 | local_bh_enable(); |
105 | } | 99 | } |
106 | } | 100 | } |
@@ -1504,8 +1498,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1504 | } | 1498 | } |
1505 | #endif | 1499 | #endif |
1506 | 1500 | ||
1507 | __inet6_hash(&tcp_hashinfo, newsk); | 1501 | __inet6_hash(newsk); |
1508 | inet_inherit_port(&tcp_hashinfo, sk, newsk); | 1502 | inet_inherit_port(sk, newsk); |
1509 | 1503 | ||
1510 | return newsk; | 1504 | return newsk; |
1511 | 1505 | ||
@@ -1833,6 +1827,7 @@ static struct inet_connection_sock_af_ops ipv6_specific = { | |||
1833 | .getsockopt = ipv6_getsockopt, | 1827 | .getsockopt = ipv6_getsockopt, |
1834 | .addr2sockaddr = inet6_csk_addr2sockaddr, | 1828 | .addr2sockaddr = inet6_csk_addr2sockaddr, |
1835 | .sockaddr_len = sizeof(struct sockaddr_in6), | 1829 | .sockaddr_len = sizeof(struct sockaddr_in6), |
1830 | .bind_conflict = inet6_csk_bind_conflict, | ||
1836 | #ifdef CONFIG_COMPAT | 1831 | #ifdef CONFIG_COMPAT |
1837 | .compat_setsockopt = compat_ipv6_setsockopt, | 1832 | .compat_setsockopt = compat_ipv6_setsockopt, |
1838 | .compat_getsockopt = compat_ipv6_getsockopt, | 1833 | .compat_getsockopt = compat_ipv6_getsockopt, |
@@ -1864,6 +1859,7 @@ static struct inet_connection_sock_af_ops ipv6_mapped = { | |||
1864 | .getsockopt = ipv6_getsockopt, | 1859 | .getsockopt = ipv6_getsockopt, |
1865 | .addr2sockaddr = inet6_csk_addr2sockaddr, | 1860 | .addr2sockaddr = inet6_csk_addr2sockaddr, |
1866 | .sockaddr_len = sizeof(struct sockaddr_in6), | 1861 | .sockaddr_len = sizeof(struct sockaddr_in6), |
1862 | .bind_conflict = inet6_csk_bind_conflict, | ||
1867 | #ifdef CONFIG_COMPAT | 1863 | #ifdef CONFIG_COMPAT |
1868 | .compat_setsockopt = compat_ipv6_setsockopt, | 1864 | .compat_setsockopt = compat_ipv6_setsockopt, |
1869 | .compat_getsockopt = compat_ipv6_getsockopt, | 1865 | .compat_getsockopt = compat_ipv6_getsockopt, |
@@ -2127,8 +2123,8 @@ struct proto tcpv6_prot = { | |||
2127 | .recvmsg = tcp_recvmsg, | 2123 | .recvmsg = tcp_recvmsg, |
2128 | .backlog_rcv = tcp_v6_do_rcv, | 2124 | .backlog_rcv = tcp_v6_do_rcv, |
2129 | .hash = tcp_v6_hash, | 2125 | .hash = tcp_v6_hash, |
2130 | .unhash = tcp_unhash, | 2126 | .unhash = inet_unhash, |
2131 | .get_port = tcp_v6_get_port, | 2127 | .get_port = inet_csk_get_port, |
2132 | .enter_memory_pressure = tcp_enter_memory_pressure, | 2128 | .enter_memory_pressure = tcp_enter_memory_pressure, |
2133 | .sockets_allocated = &tcp_sockets_allocated, | 2129 | .sockets_allocated = &tcp_sockets_allocated, |
2134 | .memory_allocated = &tcp_memory_allocated, | 2130 | .memory_allocated = &tcp_memory_allocated, |
@@ -2141,6 +2137,7 @@ struct proto tcpv6_prot = { | |||
2141 | .obj_size = sizeof(struct tcp6_sock), | 2137 | .obj_size = sizeof(struct tcp6_sock), |
2142 | .twsk_prot = &tcp6_timewait_sock_ops, | 2138 | .twsk_prot = &tcp6_timewait_sock_ops, |
2143 | .rsk_prot = &tcp6_request_sock_ops, | 2139 | .rsk_prot = &tcp6_request_sock_ops, |
2140 | .hashinfo = &tcp_hashinfo, | ||
2144 | #ifdef CONFIG_COMPAT | 2141 | #ifdef CONFIG_COMPAT |
2145 | .compat_setsockopt = compat_tcp_setsockopt, | 2142 | .compat_setsockopt = compat_tcp_setsockopt, |
2146 | .compat_getsockopt = compat_tcp_getsockopt, | 2143 | .compat_getsockopt = compat_tcp_getsockopt, |