[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120126.162944.519956918126453122.davem@davemloft.net>
Date: Thu, 26 Jan 2012 16:29:44 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: yoshfuji@...ux-ipv6.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] ipv4/ipv6: Prepare for new route gateway semantics.
From: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Date: Fri, 27 Jan 2012 06:24:18 +0900
> Why not use ipv6_addr_any()?
Yep, makes sense:
--------------------
ipv6: Use ipv6_addr_any()
Suggested by YOSHIFUJI Hideaki.
Signed-off-by: David S. Miller <davem@...emloft.net>
---
net/ipv6/route.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7d7f306..92be12b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -125,8 +125,7 @@ static inline const void *choose_neigh_daddr(struct rt6_info *rt, const void *da
{
struct in6_addr *p = &rt->rt6i_gateway;
- if (p->s6_addr32[0] | p->s6_addr32[1] |
- p->s6_addr32[2] | p->s6_addr32[3])
+ if (!ipv6_addr_any(p))
return (const void *) p;
return daddr;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists