mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
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: 3f27fb2321
("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>
This commit is contained in:
parent
0f04d05751
commit
df7e8e2e3e
@ -2165,7 +2165,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
|
||||
+ pkt_dev->pkt_overhead;
|
||||
}
|
||||
|
||||
for (i = 0; i < IN6_ADDR_HSIZE; i++)
|
||||
for (i = 0; i < sizeof(struct in6_addr); i++)
|
||||
if (pkt_dev->cur_in6_saddr.s6_addr[i]) {
|
||||
set = 1;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user