]> err.no Git - linux-2.6/commitdiff
[IPV4] net/core: Use ipv4_is_<type>
authorJoe Perches <joe@perches.com>
Sun, 16 Dec 2007 21:44:00 +0000 (13:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:15 +0000 (14:58 -0800)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/netpoll.c
net/core/pktgen.c

index b1d5acd2fc7a7dc88a20f8b3b0650553a63c638c..6faa128a4c8ef22d110c22b2add2dc8a4ffbbfd3 100644 (file)
@@ -410,7 +410,8 @@ static void arp_reply(struct sk_buff *skb)
        memcpy(&tip, arp_ptr, 4);
 
        /* Should we ignore arp? */
-       if (tip != htonl(np->local_ip) || LOOPBACK(tip) || MULTICAST(tip))
+       if (tip != htonl(np->local_ip) ||
+           ipv4_is_loopback(tip) || ipv4_is_multicast(tip))
                return;
 
        size = sizeof(struct arphdr) + 2 * (skb->dev->addr_len + 4);
index 285ec3ed9b378179248b8d8900ad983c9ee0f210..ede1feacddf97f965c8e6dfc36fdd42334093cb1 100644 (file)
@@ -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);
                                        }