aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/tcp.h6
-rw-r--r--net/ipv4/tcp_ipv4.c4
-rw-r--r--net/ipv6/tcp_ipv6.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 8afac76cd748..61723a7c21fe 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -233,7 +233,7 @@ struct tcp_request_sock {
233 struct inet_request_sock req; 233 struct inet_request_sock req;
234#ifdef CONFIG_TCP_MD5SIG 234#ifdef CONFIG_TCP_MD5SIG
235 /* Only used by TCP MD5 Signature so far. */ 235 /* Only used by TCP MD5 Signature so far. */
236 struct tcp_request_sock_ops *af_specific; 236 const struct tcp_request_sock_ops *af_specific;
237#endif 237#endif
238 u32 rcv_isn; 238 u32 rcv_isn;
239 u32 snt_isn; 239 u32 snt_isn;
@@ -401,9 +401,9 @@ struct tcp_sock {
401 401
402#ifdef CONFIG_TCP_MD5SIG 402#ifdef CONFIG_TCP_MD5SIG
403/* TCP AF-Specific parts; only used by MD5 Signature support so far */ 403/* TCP AF-Specific parts; only used by MD5 Signature support so far */
404 struct tcp_sock_af_ops *af_specific; 404 const struct tcp_sock_af_ops *af_specific;
405 405
406/* TCP MD5 Signagure Option information */ 406/* TCP MD5 Signature Option information */
407 struct tcp_md5sig_info *md5sig_info; 407 struct tcp_md5sig_info *md5sig_info;
408#endif 408#endif
409}; 409};
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 6755e29a6dd3..3efbe94f022b 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1195,7 +1195,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = {
1195}; 1195};
1196 1196
1197#ifdef CONFIG_TCP_MD5SIG 1197#ifdef CONFIG_TCP_MD5SIG
1198static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { 1198static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
1199 .md5_lookup = tcp_v4_reqsk_md5_lookup, 1199 .md5_lookup = tcp_v4_reqsk_md5_lookup,
1200 .calc_md5_hash = tcp_v4_md5_hash_skb, 1200 .calc_md5_hash = tcp_v4_md5_hash_skb,
1201}; 1201};
@@ -1774,7 +1774,7 @@ struct inet_connection_sock_af_ops ipv4_specific = {
1774}; 1774};
1775 1775
1776#ifdef CONFIG_TCP_MD5SIG 1776#ifdef CONFIG_TCP_MD5SIG
1777static struct tcp_sock_af_ops tcp_sock_ipv4_specific = { 1777static const struct tcp_sock_af_ops tcp_sock_ipv4_specific = {
1778 .md5_lookup = tcp_v4_md5_lookup, 1778 .md5_lookup = tcp_v4_md5_lookup,
1779 .calc_md5_hash = tcp_v4_md5_hash_skb, 1779 .calc_md5_hash = tcp_v4_md5_hash_skb,
1780 .md5_add = tcp_v4_md5_add_func, 1780 .md5_add = tcp_v4_md5_add_func,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index d849dd53b788..eadbc584e919 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -78,8 +78,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb);
78static struct inet_connection_sock_af_ops ipv6_mapped; 78static struct inet_connection_sock_af_ops ipv6_mapped;
79static struct inet_connection_sock_af_ops ipv6_specific; 79static struct inet_connection_sock_af_ops ipv6_specific;
80#ifdef CONFIG_TCP_MD5SIG 80#ifdef CONFIG_TCP_MD5SIG
81static struct tcp_sock_af_ops tcp_sock_ipv6_specific; 81static const struct tcp_sock_af_ops tcp_sock_ipv6_specific;
82static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific; 82static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific;
83#else 83#else
84static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk, 84static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
85 struct in6_addr *addr) 85 struct in6_addr *addr)
@@ -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
897static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { 897static 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};
@@ -1780,7 +1780,7 @@ static struct inet_connection_sock_af_ops ipv6_specific = {
1780}; 1780};
1781 1781
1782#ifdef CONFIG_TCP_MD5SIG 1782#ifdef CONFIG_TCP_MD5SIG
1783static struct tcp_sock_af_ops tcp_sock_ipv6_specific = { 1783static const struct tcp_sock_af_ops tcp_sock_ipv6_specific = {
1784 .md5_lookup = tcp_v6_md5_lookup, 1784 .md5_lookup = tcp_v6_md5_lookup,
1785 .calc_md5_hash = tcp_v6_md5_hash_skb, 1785 .calc_md5_hash = tcp_v6_md5_hash_skb,
1786 .md5_add = tcp_v6_md5_add_func, 1786 .md5_add = tcp_v6_md5_add_func,
@@ -1812,7 +1812,7 @@ static struct inet_connection_sock_af_ops ipv6_mapped = {
1812}; 1812};
1813 1813
1814#ifdef CONFIG_TCP_MD5SIG 1814#ifdef CONFIG_TCP_MD5SIG
1815static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { 1815static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = {
1816 .md5_lookup = tcp_v4_md5_lookup, 1816 .md5_lookup = tcp_v4_md5_lookup,
1817 .calc_md5_hash = tcp_v4_md5_hash_skb, 1817 .calc_md5_hash = tcp_v4_md5_hash_skb,
1818 .md5_add = tcp_v6_md5_add_func, 1818 .md5_add = tcp_v6_md5_add_func,