diff options
author | Hagen Paul Pfeifer <hagen@jauu.net> | 2009-02-20 09:48:06 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-02-20 09:48:06 (GMT) |
commit | af07d241dc76f0a52c7ff04df3a3970020fe6157 (patch) | |
tree | c1461cfc8c0ab342996efd6982e9b376dea62f54 /net/netfilter/nf_conntrack_expect.c | |
parent | e478075c6f07a383c378fb400edc1a7407a941b0 (diff) | |
download | linux-fsl-qoriq-af07d241dc76f0a52c7ff04df3a3970020fe6157.tar.xz |
netfilter: fix hardcoded size assumptions
get_random_bytes() is sometimes called with a hard coded size assumption
of an integer. This could not be true for next centuries. This patch
replace it with a compile time statement.
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_expect.c')
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 3a8a34a..357ba39 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c @@ -72,7 +72,8 @@ static unsigned int nf_ct_expect_dst_hash(const struct nf_conntrack_tuple *tuple unsigned int hash; if (unlikely(!nf_ct_expect_hash_rnd_initted)) { - get_random_bytes(&nf_ct_expect_hash_rnd, 4); + get_random_bytes(&nf_ct_expect_hash_rnd, + sizeof(nf_ct_expect_hash_rnd)); nf_ct_expect_hash_rnd_initted = 1; } |