aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-12-16 16:44:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:15 -0500
commit21cf2253ebcf070bc307e0b56d696a2519c75cb4 (patch)
tree9092cd731d94175b66f4d29437fb023932329a5d /net
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')
-rw-r--r--net/core/netpoll.c3
-rw-r--r--net/core/pktgen.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index b1d5acd2fc7a..6faa128a4c8e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -410,7 +410,8 @@ static void arp_reply(struct sk_buff *skb)
410 memcpy(&tip, arp_ptr, 4); 410 memcpy(&tip, arp_ptr, 4);
411 411
412 /* Should we ignore arp? */ 412 /* Should we ignore arp? */
413 if (tip != htonl(np->local_ip) || LOOPBACK(tip) || MULTICAST(tip)) 413 if (tip != htonl(np->local_ip) ||
414 ipv4_is_loopback(tip) || ipv4_is_multicast(tip))
414 return; 415 return;
415 416
416 size = sizeof(struct arphdr) + 2 * (skb->dev->addr_len + 4); 417 size = sizeof(struct arphdr) + 2 * (skb->dev->addr_len + 4);
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 }