aboutgitcodebugslistschat
path: root/siphash.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-17 16:58:59 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-11-25 01:35:41 +0100
commita93bfada5bdcdf4dc644c705e24c42a3dd586649 (patch)
tree4a442d798503948ca0406ad43fffcabcb97a7a27 /siphash.c
parent7114fc92eb2d32251c9f21c56572a4e7cb1f1254 (diff)
downloadpasst-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar.gz
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar.bz2
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar.lz
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar.xz
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.tar.zst
passt-a93bfada5bdcdf4dc644c705e24c42a3dd586649.zip
tcp: Unify initial sequence number calculation for IPv4 and IPv6
tcp_seq_init() has separate paths for IPv4 and IPv6 addresses, which means we will calculate different sequence numbers for IPv4 and equivalent IPv4-mapped IPv6 addresses. Change it to treat these the same by always converting the input address into an inany_addr representation and use that to calculate the sequence number. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'siphash.c')
-rw-r--r--siphash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/siphash.c b/siphash.c
index 516a508..811918b 100644
--- a/siphash.c
+++ b/siphash.c
@@ -123,6 +123,7 @@ uint64_t siphash_8b(const uint8_t *in, const uint64_t *k)
*
* Return: 32 bits obtained by XORing the two halves of the 64-bit hash output
*/
+/* cppcheck-suppress unusedFunction */
uint32_t siphash_12b(const uint8_t *in, const uint64_t *k)
{
uint32_t *in32 = (uint32_t *)in;