[PATCH net-next] pktgen: Use ipv6_addr_any

Subsystems: networking [general], the rest

STALE5101d

2 messages, 2 authors, 2012-10-22 · open the first message on its own page

[PATCH net-next] pktgen: Use ipv6_addr_any

From: Joe Perches <joe@perches.com>
Date: 2012-10-19 03:55:36

Use the standard test for a non-zero ipv6 address.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/pktgen.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index d1dc14c..1d1c216 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -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 */
-- 
1.8.0.rc2.dirty

Re: [PATCH net-next] pktgen: Use ipv6_addr_any

From: David Miller <davem@davemloft.net>
Date: 2012-10-22 00:37:40

From: Joe Perches <joe@perches.com>
Date: Thu, 18 Oct 2012 20:55:31 -0700
Use the standard test for a non-zero ipv6 address.

Signed-off-by: Joe Perches <joe@perches.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help