Thread (23 messages) 23 messages, 6 authors, 2013-08-30

Re: [PATCH net-next v10 07/11] vxlan: add ipv6 route short circuit support

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-08-28 16:08:05

On Wed, 28 Aug 2013 13:22:55 +0800
Cong Wang [off-list ref] wrote:
+		n = neigh_lookup(ipv6_stub->nd_tbl, &pip6->daddr, dev);
+		if (!n && vxlan->flags & VXLAN_F_L3MISS) {
+			union vxlan_addr ipa;
+			ipa.sin6.sin6_addr = pip6->daddr;
+			ipa.sa.sa_family = AF_INET6;
Please always add paren's when doing bitwise mask in comparison, gcc will even warn
about this.

You could use C99 initialization for this which has added benefit
of zeroing unused fields.
			union vxlan_addr ipa = {
				.sa.sa_family = AF_INET6,
				.sin6.sin6_sin6)addr = pip6->daddr,
			};
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help