Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pktgen: do not abuse IN6_ADDR_HSIZE

pktgen accidentally used IN6_ADDR_HSIZE, instead of using the size of an
IPv6 address.

Since IN6_ADDR_HSIZE recently was increased from 16 to 256, this old
bug is hitting us.

Fixes: 3f27fb23219e ("ipv6: addrconf: add per netns perturbation in inet6_addr_hash()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
df7e8e2e 0f04d057

+1 -1
+1 -1
net/core/pktgen.c
··· 2165 2165 + pkt_dev->pkt_overhead; 2166 2166 } 2167 2167 2168 - for (i = 0; i < IN6_ADDR_HSIZE; i++) 2168 + for (i = 0; i < sizeof(struct in6_addr); i++) 2169 2169 if (pkt_dev->cur_in6_saddr.s6_addr[i]) { 2170 2170 set = 1; 2171 2171 break;