[IPV4] net/core: Use ipv4_is_<type>
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3db8cda362
commit
21cf2253eb
@@ -2358,9 +2358,11 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
|
||||
t = random32() % (imx - imn) + imn;
|
||||
s = htonl(t);
|
||||
|
||||
while (LOOPBACK(s) || MULTICAST(s)
|
||||
|| BADCLASS(s) || ZERONET(s)
|
||||
|| LOCAL_MCAST(s)) {
|
||||
while (ipv4_is_loopback(s) ||
|
||||
ipv4_is_multicast(s) ||
|
||||
ipv4_is_badclass(s) ||
|
||||
ipv4_is_zeronet(s) ||
|
||||
ipv4_is_local_multicast(s)) {
|
||||
t = random32() % (imx - imn) + imn;
|
||||
s = htonl(t);
|
||||
}
|
||||
|
Reference in New Issue
Block a user