aboutsummaryrefslogtreecommitdiff
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-12-16 13:44:00 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:58:15 -0800
commit21cf2253ebcf070bc307e0b56d696a2519c75cb4 (patch)
tree9092cd731d94175b66f4d29437fb023932329a5d /net/core/pktgen.c
parent3db8cda362dced00caf19865ffda3fa1028c59bc (diff)
[IPV4] net/core: Use ipv4_is_<type>
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 285ec3ed9b3..ede1feacddf 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)
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);
}