Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df7e8e2e authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: 3f27fb23 ("ipv6: addrconf: add per netns perturbation in inet6_addr_hash()")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f04d057
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;