netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/5] tcp: MD5 operations should be const
Date: Tue, 01 Sep 2009 22:25:03 -0700	[thread overview]
Message-ID: <20090902052538.428954402@vyatta.com> (raw)
In-Reply-To: 20090902052500.808557262@vyatta.com

[-- Attachment #1: const-md5-ops.patch --]
[-- Type: text/plain, Size: 3439 bytes --]

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 include/linux/tcp.h |    6 +++---
 net/ipv4/tcp_ipv4.c |    4 ++--
 net/ipv6/tcp_ipv6.c |   10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

--- a/include/linux/tcp.h	2009-09-01 21:45:24.022174846 -0700
+++ b/include/linux/tcp.h	2009-09-01 21:52:18.131739158 -0700
@@ -233,7 +233,7 @@ struct tcp_request_sock {
 	struct inet_request_sock 	req;
 #ifdef CONFIG_TCP_MD5SIG
 	/* Only used by TCP MD5 Signature so far. */
-	struct tcp_request_sock_ops	*af_specific;
+	const struct tcp_request_sock_ops *af_specific;
 #endif
 	u32			 	rcv_isn;
 	u32			 	snt_isn;
@@ -401,9 +401,9 @@ struct tcp_sock {
 
 #ifdef CONFIG_TCP_MD5SIG
 /* TCP AF-Specific parts; only used by MD5 Signature support so far */
-	struct tcp_sock_af_ops	*af_specific;
+	const struct tcp_sock_af_ops	*af_specific;
 
-/* TCP MD5 Signagure Option information */
+/* TCP MD5 Signature Option information */
 	struct tcp_md5sig_info	*md5sig_info;
 #endif
 };
--- a/net/ipv4/tcp_ipv4.c	2009-09-01 21:45:24.039229254 -0700
+++ b/net/ipv4/tcp_ipv4.c	2009-09-01 22:22:23.997230300 -0700
@@ -1195,7 +1195,7 @@ struct request_sock_ops tcp_request_sock
 };
 
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
+static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
 	.md5_lookup	=	tcp_v4_reqsk_md5_lookup,
 	.calc_md5_hash	=	tcp_v4_md5_hash_skb,
 };
@@ -1774,7 +1774,7 @@ struct inet_connection_sock_af_ops ipv4_
 };
 
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_sock_af_ops tcp_sock_ipv4_specific = {
+static const struct tcp_sock_af_ops tcp_sock_ipv4_specific = {
 	.md5_lookup		= tcp_v4_md5_lookup,
 	.calc_md5_hash		= tcp_v4_md5_hash_skb,
 	.md5_add		= tcp_v4_md5_add_func,
--- a/net/ipv6/tcp_ipv6.c	2009-09-01 21:45:24.055740485 -0700
+++ b/net/ipv6/tcp_ipv6.c	2009-09-01 22:22:23.988774018 -0700
@@ -78,8 +78,8 @@ static int	tcp_v6_do_rcv(struct sock *sk
 static struct inet_connection_sock_af_ops ipv6_mapped;
 static struct inet_connection_sock_af_ops ipv6_specific;
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_sock_af_ops tcp_sock_ipv6_specific;
-static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific;
+static const struct tcp_sock_af_ops tcp_sock_ipv6_specific;
+static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific;
 #else
 static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
 						   struct in6_addr *addr)
@@ -894,7 +894,7 @@ struct request_sock_ops tcp6_request_soc
 };
 
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
+static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
 	.md5_lookup	=	tcp_v6_reqsk_md5_lookup,
 	.calc_md5_hash	=	tcp_v6_md5_hash_skb,
 };
@@ -1780,7 +1780,7 @@ static struct inet_connection_sock_af_op
 };
 
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_sock_af_ops tcp_sock_ipv6_specific = {
+static const struct tcp_sock_af_ops tcp_sock_ipv6_specific = {
 	.md5_lookup	=	tcp_v6_md5_lookup,
 	.calc_md5_hash	=	tcp_v6_md5_hash_skb,
 	.md5_add	=	tcp_v6_md5_add_func,
@@ -1812,7 +1812,7 @@ static struct inet_connection_sock_af_op
 };
 
 #ifdef CONFIG_TCP_MD5SIG
-static struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = {
+static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = {
 	.md5_lookup	=	tcp_v4_md5_lookup,
 	.calc_md5_hash	=	tcp_v4_md5_hash_skb,
 	.md5_add	=	tcp_v6_md5_add_func,

-- 


  parent reply	other threads:[~2009-09-02  5:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02  5:25 [PATCH 0/5] More const ops cleanups Stephen Hemminger
2009-09-02  5:25 ` [PATCH 1/5] netdev: drivers should make ethtool_ops const Stephen Hemminger
     [not found]   ` <20090902052538.276324751-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-02 13:53     ` John W. Linville
2009-09-02  5:25 ` [PATCH 2/5] net: seq_operations should be const Stephen Hemminger
2009-09-02  5:25 ` Stephen Hemminger [this message]
2009-09-02  5:25 ` [PATCH 4/5] inet: inet_connection_sock_af_ops const Stephen Hemminger
2009-09-02  5:25 ` [PATCH 5/5] net: file_operations should be const Stephen Hemminger
2009-09-02  8:55   ` Samuel Ortiz
2009-09-02 13:53   ` John W. Linville
2009-09-02  7:46 ` [PATCH 0/5] More const ops cleanups David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090902052538.428954402@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).