Skip to content

Commit df7e8e2

Browse files
edumazetdavem330
authored andcommitted
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: 3f27fb2 ("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>
1 parent 0f04d05 commit df7e8e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/pktgen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
21652165
+ pkt_dev->pkt_overhead;
21662166
}
21672167

2168-
for (i = 0; i < IN6_ADDR_HSIZE; i++)
2168+
for (i = 0; i < sizeof(struct in6_addr); i++)
21692169
if (pkt_dev->cur_in6_saddr.s6_addr[i]) {
21702170
set = 1;
21712171
break;

0 commit comments

Comments
 (0)