Skip to content

Commit

Permalink
pktgen: Use ipv6_addr_any
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Oct 22, 2012
1 parent 3fbca4a commit 06e3041
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 06e3041

Please sign in to comment.