diff --git a/lib/flow.c b/lib/flow.c index 779bb54d50a..b30ecbfd6ed 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1931,7 +1931,7 @@ flow_hash_symmetric_l3l4(const struct flow *flow, uint32_t basis, const uint64_t *a = ALIGNED_CAST(uint64_t *, flow->ipv6_src.s6_addr); const uint64_t *b = ALIGNED_CAST(uint64_t *, flow->ipv6_dst.s6_addr); - for (int i = 0; i < 4; i++) { + for (int i = 0; i < sizeof flow->ipv6_src / sizeof *a; i++) { hash = hash_add64(hash, a[i] ^ b[i]); } } else {