diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d849dd53b788..3aae0f217d61 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -75,11 +75,11 @@ static void tcp_v6_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, | |||
75 | 75 | ||
76 | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb); | 76 | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb); |
77 | 77 | ||
78 | static struct inet_connection_sock_af_ops ipv6_mapped; | 78 | static const struct inet_connection_sock_af_ops ipv6_mapped; |
79 | static struct inet_connection_sock_af_ops ipv6_specific; | 79 | static const struct inet_connection_sock_af_ops ipv6_specific; |
80 | #ifdef CONFIG_TCP_MD5SIG | 80 | #ifdef CONFIG_TCP_MD5SIG |
81 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific; | 81 | static const struct tcp_sock_af_ops tcp_sock_ipv6_specific; |
82 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; | 82 | static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; |
83 | #else | 83 | #else |
84 | static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, | 84 | static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, |
85 | struct in6_addr *addr) | 85 | struct in6_addr *addr) |
@@ -591,7 +591,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer, | |||
591 | } | 591 | } |
592 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | 592 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; |
593 | } | 593 | } |
594 | if (tcp_alloc_md5sig_pool() == NULL) { | 594 | if (tcp_alloc_md5sig_pool(sk) == NULL) { |
595 | kfree(newkey); | 595 | kfree(newkey); |
596 | return -ENOMEM; | 596 | return -ENOMEM; |
597 | } | 597 | } |
@@ -894,7 +894,7 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = { | |||
894 | }; | 894 | }; |
895 | 895 | ||
896 | #ifdef CONFIG_TCP_MD5SIG | 896 | #ifdef CONFIG_TCP_MD5SIG |
897 | static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { | 897 | static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { |
898 | .md5_lookup = tcp_v6_reqsk_md5_lookup, | 898 | .md5_lookup = tcp_v6_reqsk_md5_lookup, |
899 | .calc_md5_hash = tcp_v6_md5_hash_skb, | 899 | .calc_md5_hash = tcp_v6_md5_hash_skb, |
900 | }; | 900 | }; |
@@ -1003,6 +1003,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
1003 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); | 1003 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); |
1004 | 1004 | ||
1005 | t1 = (struct tcphdr *) skb_push(buff, tot_len); | 1005 | t1 = (struct tcphdr *) skb_push(buff, tot_len); |
1006 | skb_reset_transport_header(skb); | ||
1006 | 1007 | ||
1007 | /* Swap the send and the receive. */ | 1008 | /* Swap the send and the receive. */ |
1008 | memset(t1, 0, sizeof(*t1)); | 1009 | memset(t1, 0, sizeof(*t1)); |
@@ -1760,7 +1761,7 @@ static int tcp_v6_remember_stamp(struct sock *sk) | |||
1760 | return 0; | 1761 | return 0; |
1761 | } | 1762 | } |
1762 | 1763 | ||
1763 | static struct inet_connection_sock_af_ops ipv6_specific = { | 1764 | static const struct inet_connection_sock_af_ops ipv6_specific = { |
1764 | .queue_xmit = inet6_csk_xmit, | 1765 | .queue_xmit = inet6_csk_xmit, |
1765 | .send_check = tcp_v6_send_check, | 1766 | .send_check = tcp_v6_send_check, |
1766 | .rebuild_header = inet6_sk_rebuild_header, | 1767 | .rebuild_header = inet6_sk_rebuild_header, |
@@ -1780,7 +1781,7 @@ static struct inet_connection_sock_af_ops ipv6_specific = { | |||
1780 | }; | 1781 | }; |
1781 | 1782 | ||
1782 | #ifdef CONFIG_TCP_MD5SIG | 1783 | #ifdef CONFIG_TCP_MD5SIG |
1783 | static struct tcp_sock_af_ops tcp_sock_ipv6_specific = { | 1784 | static const struct tcp_sock_af_ops tcp_sock_ipv6_specific = { |
1784 | .md5_lookup = tcp_v6_md5_lookup, | 1785 | .md5_lookup = tcp_v6_md5_lookup, |
1785 | .calc_md5_hash = tcp_v6_md5_hash_skb, | 1786 | .calc_md5_hash = tcp_v6_md5_hash_skb, |
1786 | .md5_add = tcp_v6_md5_add_func, | 1787 | .md5_add = tcp_v6_md5_add_func, |
@@ -1792,7 +1793,7 @@ static struct tcp_sock_af_ops tcp_sock_ipv6_specific = { | |||
1792 | * TCP over IPv4 via INET6 API | 1793 | * TCP over IPv4 via INET6 API |
1793 | */ | 1794 | */ |
1794 | 1795 | ||
1795 | static struct inet_connection_sock_af_ops ipv6_mapped = { | 1796 | static const struct inet_connection_sock_af_ops ipv6_mapped = { |
1796 | .queue_xmit = ip_queue_xmit, | 1797 | .queue_xmit = ip_queue_xmit, |
1797 | .send_check = tcp_v4_send_check, | 1798 | .send_check = tcp_v4_send_check, |
1798 | .rebuild_header = inet_sk_rebuild_header, | 1799 | .rebuild_header = inet_sk_rebuild_header, |
@@ -1812,7 +1813,7 @@ static struct inet_connection_sock_af_ops ipv6_mapped = { | |||
1812 | }; | 1813 | }; |
1813 | 1814 | ||
1814 | #ifdef CONFIG_TCP_MD5SIG | 1815 | #ifdef CONFIG_TCP_MD5SIG |
1815 | static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { | 1816 | static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { |
1816 | .md5_lookup = tcp_v4_md5_lookup, | 1817 | .md5_lookup = tcp_v4_md5_lookup, |
1817 | .calc_md5_hash = tcp_v4_md5_hash_skb, | 1818 | .calc_md5_hash = tcp_v4_md5_hash_skb, |
1818 | .md5_add = tcp_v6_md5_add_func, | 1819 | .md5_add = tcp_v6_md5_add_func, |