Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21cf2253ebcf070bc307e0b56d696a2519c75cb4
Commit:     21cf2253ebcf070bc307e0b56d696a2519c75cb4
Parent:     3db8cda362dced00caf19865ffda3fa1028c59bc
Author:     Joe Perches <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 16 13:44:00 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:58:15 2008 -0800

    [IPV4] net/core: Use ipv4_is_<type>
    
    Signed-off-by: Joe Perches <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/netpoll.c |    3 ++-
 net/core/pktgen.c  |    8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index b1d5acd..6faa128 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -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);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 285ec3e..ede1fea 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);
                                        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to