summaryrefslogtreecommitdiffstats
path: root/net/ipv4/syncookies.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-10-21 11:22:42 +0200
committerDavid S. Miller <davem@davemloft.net>2011-10-21 11:22:42 +0200
commitcf533ea53ebfae41be15b103d78e7ebec30b9969 (patch)
tree51ed3c69f4a15117fefe5cbd291a75010beb0f4b /net/ipv4/syncookies.c
parentdev: use name hash for dev_seq_ops (diff)
downloadlinux-cf533ea53ebfae41be15b103d78e7ebec30b9969.tar.xz
linux-cf533ea53ebfae41be15b103d78e7ebec30b9969.zip
tcp: add const qualifiers where possible
Adding const qualifiers to pointers can ease code review, and spot some bugs. It might allow compiler to optimize code further. For example, is it legal to temporary write a null cksum into tcphdr in tcp_md5_hash_header() ? I am afraid a sniffer could catch the temporary null value... Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r--net/ipv4/syncookies.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 3bc5c8f7c71b..d7b89b12f6d8 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -265,7 +265,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
struct ip_options *opt)
{
struct tcp_options_received tcp_opt;
- u8 *hash_location;
+ const u8 *hash_location;
struct inet_request_sock *ireq;
struct tcp_request_sock *treq;
struct tcp_sock *tp = tcp_sk(sk);