aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 285ec3ed9b37..ede1feacddf9 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2358,9 +2358,11 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
2358 t = random32() % (imx - imn) + imn; 2358 t = random32() % (imx - imn) + imn;
2359 s = htonl(t); 2359 s = htonl(t);
2360 2360
2361 while (LOOPBACK(s) || MULTICAST(s) 2361 while (ipv4_is_loopback(s) ||
2362 || BADCLASS(s) || ZERONET(s) 2362 ipv4_is_multicast(s) ||
2363 || LOCAL_MCAST(s)) { 2363 ipv4_is_badclass(s) ||
2364 ipv4_is_zeronet(s) ||
2365 ipv4_is_local_multicast(s)) {
2364 t = random32() % (imx - imn) + imn; 2366 t = random32() % (imx - imn) + imn;
2365 s = htonl(t); 2367 s = htonl(t);
2366 } 2368 }