[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130828090801.64a89878@nehalam.linuxnetplumber.net>
Date: Wed, 28 Aug 2013 09:08:01 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Cong Wang <amwang@...hat.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
David Stevens <dlstevens@...ibm.com>
Subject: Re: [PATCH net-next v10 07/11] vxlan: add ipv6 route short circuit
support
On Wed, 28 Aug 2013 13:22:55 +0800
Cong Wang <amwang@...hat.com> 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,
};
--
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