diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-21 05:22:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-21 05:22:42 -0400 |
commit | cf533ea53ebfae41be15b103d78e7ebec30b9969 (patch) | |
tree | 51ed3c69f4a15117fefe5cbd291a75010beb0f4b /net/core/secure_seq.c | |
parent | f04565ddf52e401880f8ba51de0dff8ba51c99fd (diff) |
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/core/secure_seq.c')
-rw-r--r-- | net/core/secure_seq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index 45329d7c9dd..025233de25f 100644 --- a/net/core/secure_seq.c +++ b/net/core/secure_seq.c @@ -35,7 +35,7 @@ static u32 seq_scale(u32 seq) } #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -__u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr, +__u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, __be16 sport, __be16 dport) { u32 secret[MD5_MESSAGE_BYTES / 4]; |