]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pktgen: Use ipv6_addr_any
authorJoe Perches <joe@perches.com>
Thu, 18 Oct 2012 17:55:31 +0000 (17:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Oct 2012 00:37:05 +0000 (20:37 -0400)
Use the standard test for a non-zero ipv6 address.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c

index d1dc14c2aac4ee00fa6dab706131bbe41d3790f7..1d1c216ffd9aae3a06261ab3dea7d31deb9a8e29 100644 (file)
@@ -2427,11 +2427,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
                }
        } else {                /* IPV6 * */
 
-               if (pkt_dev->min_in6_daddr.s6_addr32[0] == 0 &&
-                   pkt_dev->min_in6_daddr.s6_addr32[1] == 0 &&
-                   pkt_dev->min_in6_daddr.s6_addr32[2] == 0 &&
-                   pkt_dev->min_in6_daddr.s6_addr32[3] == 0) ;
-               else {
+               if (!ipv6_addr_any(&pkt_dev->min_in6_daddr)) {
                        int i;
 
                        /* Only random destinations yet */