diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-24 02:46:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-24 02:46:04 -0400 |
commit | 318cf7aaa0a6d20ecf6be33eb771291e5ff2e3b9 (patch) | |
tree | a2a42bbea9a1351d9986690f6df2a90cdbfd1d0c /net/ipv4/tcp_ipv4.c | |
parent | 8f9f4668b37bcc877156dd525a856055735c8d24 (diff) |
tcp: md5: add more const attributes
Now tcp_md5_hash_header() has a const tcphdr argument, we can add more
const attributes to callers.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 955c9255cd98..1dad7e92f005 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -92,7 +92,7 @@ EXPORT_SYMBOL(sysctl_tcp_low_latency); | |||
92 | static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, | 92 | static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, |
93 | __be32 addr); | 93 | __be32 addr); |
94 | static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, | 94 | static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, |
95 | __be32 daddr, __be32 saddr, struct tcphdr *th); | 95 | __be32 daddr, __be32 saddr, const struct tcphdr *th); |
96 | #else | 96 | #else |
97 | static inline | 97 | static inline |
98 | struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, __be32 addr) | 98 | struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, __be32 addr) |
@@ -1090,7 +1090,7 @@ static int tcp_v4_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, | |||
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, | 1092 | static int tcp_v4_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, |
1093 | __be32 daddr, __be32 saddr, struct tcphdr *th) | 1093 | __be32 daddr, __be32 saddr, const struct tcphdr *th) |
1094 | { | 1094 | { |
1095 | struct tcp_md5sig_pool *hp; | 1095 | struct tcp_md5sig_pool *hp; |
1096 | struct hash_desc *desc; | 1096 | struct hash_desc *desc; |
@@ -1122,12 +1122,12 @@ clear_hash_noput: | |||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key, | 1124 | int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key, |
1125 | struct sock *sk, struct request_sock *req, | 1125 | const struct sock *sk, const struct request_sock *req, |
1126 | struct sk_buff *skb) | 1126 | const struct sk_buff *skb) |
1127 | { | 1127 | { |
1128 | struct tcp_md5sig_pool *hp; | 1128 | struct tcp_md5sig_pool *hp; |
1129 | struct hash_desc *desc; | 1129 | struct hash_desc *desc; |
1130 | struct tcphdr *th = tcp_hdr(skb); | 1130 | const struct tcphdr *th = tcp_hdr(skb); |
1131 | __be32 saddr, daddr; | 1131 | __be32 saddr, daddr; |
1132 | 1132 | ||
1133 | if (sk) { | 1133 | if (sk) { |
@@ -1172,7 +1172,7 @@ clear_hash_noput: | |||
1172 | } | 1172 | } |
1173 | EXPORT_SYMBOL(tcp_v4_md5_hash_skb); | 1173 | EXPORT_SYMBOL(tcp_v4_md5_hash_skb); |
1174 | 1174 | ||
1175 | static int tcp_v4_inbound_md5_hash(struct sock *sk, struct sk_buff *skb) | 1175 | static int tcp_v4_inbound_md5_hash(struct sock *sk, const struct sk_buff *skb) |
1176 | { | 1176 | { |
1177 | /* | 1177 | /* |
1178 | * This gets called for each TCP segment that arrives | 1178 | * This gets called for each TCP segment that arrives |