diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 2f8975e0150..301eee726b0 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1298,22 +1298,21 @@ static int tcp_v6_remember_stamp(struct sock *sk) | |||
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | static struct inet_connection_sock_af_ops ipv6_specific = { | 1300 | static struct inet_connection_sock_af_ops ipv6_specific = { |
1301 | .queue_xmit = inet6_csk_xmit, | 1301 | .queue_xmit = inet6_csk_xmit, |
1302 | .send_check = tcp_v6_send_check, | 1302 | .send_check = tcp_v6_send_check, |
1303 | .rebuild_header = inet6_sk_rebuild_header, | 1303 | .rebuild_header = inet6_sk_rebuild_header, |
1304 | .conn_request = tcp_v6_conn_request, | 1304 | .conn_request = tcp_v6_conn_request, |
1305 | .syn_recv_sock = tcp_v6_syn_recv_sock, | 1305 | .syn_recv_sock = tcp_v6_syn_recv_sock, |
1306 | .remember_stamp = tcp_v6_remember_stamp, | 1306 | .remember_stamp = tcp_v6_remember_stamp, |
1307 | .net_header_len = sizeof(struct ipv6hdr), | 1307 | .net_header_len = sizeof(struct ipv6hdr), |
1308 | 1308 | .setsockopt = ipv6_setsockopt, | |
1309 | .setsockopt = ipv6_setsockopt, | 1309 | .getsockopt = ipv6_getsockopt, |
1310 | .getsockopt = ipv6_getsockopt, | 1310 | .addr2sockaddr = inet6_csk_addr2sockaddr, |
1311 | .sockaddr_len = sizeof(struct sockaddr_in6), | ||
1311 | #ifdef CONFIG_COMPAT | 1312 | #ifdef CONFIG_COMPAT |
1312 | .compat_setsockopt = compat_ipv6_setsockopt, | 1313 | .compat_setsockopt = compat_ipv6_setsockopt, |
1313 | .compat_getsockopt = compat_ipv6_getsockopt, | 1314 | .compat_getsockopt = compat_ipv6_getsockopt, |
1314 | #endif | 1315 | #endif |
1315 | .addr2sockaddr = inet6_csk_addr2sockaddr, | ||
1316 | .sockaddr_len = sizeof(struct sockaddr_in6) | ||
1317 | }; | 1316 | }; |
1318 | 1317 | ||
1319 | /* | 1318 | /* |
@@ -1321,26 +1320,23 @@ static struct inet_connection_sock_af_ops ipv6_specific = { | |||
1321 | */ | 1320 | */ |
1322 | 1321 | ||
1323 | static struct inet_connection_sock_af_ops ipv6_mapped = { | 1322 | static struct inet_connection_sock_af_ops ipv6_mapped = { |
1324 | .queue_xmit = ip_queue_xmit, | 1323 | .queue_xmit = ip_queue_xmit, |
1325 | .send_check = tcp_v4_send_check, | 1324 | .send_check = tcp_v4_send_check, |
1326 | .rebuild_header = inet_sk_rebuild_header, | 1325 | .rebuild_header = inet_sk_rebuild_header, |
1327 | .conn_request = tcp_v6_conn_request, | 1326 | .conn_request = tcp_v6_conn_request, |
1328 | .syn_recv_sock = tcp_v6_syn_recv_sock, | 1327 | .syn_recv_sock = tcp_v6_syn_recv_sock, |
1329 | .remember_stamp = tcp_v4_remember_stamp, | 1328 | .remember_stamp = tcp_v4_remember_stamp, |
1330 | .net_header_len = sizeof(struct iphdr), | 1329 | .net_header_len = sizeof(struct iphdr), |
1331 | 1330 | .setsockopt = ipv6_setsockopt, | |
1332 | .setsockopt = ipv6_setsockopt, | 1331 | .getsockopt = ipv6_getsockopt, |
1333 | .getsockopt = ipv6_getsockopt, | 1332 | .addr2sockaddr = inet6_csk_addr2sockaddr, |
1333 | .sockaddr_len = sizeof(struct sockaddr_in6), | ||
1334 | #ifdef CONFIG_COMPAT | 1334 | #ifdef CONFIG_COMPAT |
1335 | .compat_setsockopt = compat_ipv6_setsockopt, | 1335 | .compat_setsockopt = compat_ipv6_setsockopt, |
1336 | .compat_getsockopt = compat_ipv6_getsockopt, | 1336 | .compat_getsockopt = compat_ipv6_getsockopt, |
1337 | #endif | 1337 | #endif |
1338 | .addr2sockaddr = inet6_csk_addr2sockaddr, | ||
1339 | .sockaddr_len = sizeof(struct sockaddr_in6) | ||
1340 | }; | 1338 | }; |
1341 | 1339 | ||
1342 | |||
1343 | |||
1344 | /* NOTE: A lot of things set to zero explicitly by call to | 1340 | /* NOTE: A lot of things set to zero explicitly by call to |
1345 | * sk_alloc() so need not be done here. | 1341 | * sk_alloc() so need not be done here. |
1346 | */ | 1342 | */ |
@@ -1574,10 +1570,6 @@ struct proto tcpv6_prot = { | |||
1574 | .shutdown = tcp_shutdown, | 1570 | .shutdown = tcp_shutdown, |
1575 | .setsockopt = tcp_setsockopt, | 1571 | .setsockopt = tcp_setsockopt, |
1576 | .getsockopt = tcp_getsockopt, | 1572 | .getsockopt = tcp_getsockopt, |
1577 | #ifdef CONFIG_COMPAT | ||
1578 | .compat_setsockopt = compat_tcp_setsockopt, | ||
1579 | .compat_getsockopt = compat_tcp_getsockopt, | ||
1580 | #endif | ||
1581 | .sendmsg = tcp_sendmsg, | 1573 | .sendmsg = tcp_sendmsg, |
1582 | .recvmsg = tcp_recvmsg, | 1574 | .recvmsg = tcp_recvmsg, |
1583 | .backlog_rcv = tcp_v6_do_rcv, | 1575 | .backlog_rcv = tcp_v6_do_rcv, |
@@ -1596,6 +1588,10 @@ struct proto tcpv6_prot = { | |||
1596 | .obj_size = sizeof(struct tcp6_sock), | 1588 | .obj_size = sizeof(struct tcp6_sock), |
1597 | .twsk_prot = &tcp6_timewait_sock_ops, | 1589 | .twsk_prot = &tcp6_timewait_sock_ops, |
1598 | .rsk_prot = &tcp6_request_sock_ops, | 1590 | .rsk_prot = &tcp6_request_sock_ops, |
1591 | #ifdef CONFIG_COMPAT | ||
1592 | .compat_setsockopt = compat_tcp_setsockopt, | ||
1593 | .compat_getsockopt = compat_tcp_getsockopt, | ||
1594 | #endif | ||
1599 | }; | 1595 | }; |
1600 | 1596 | ||
1601 | static struct inet6_protocol tcpv6_protocol = { | 1597 | static struct inet6_protocol tcpv6_protocol = { |