From: David Miller <davem@davemloft.net>
To: gstenzel@linux.vnet.ibm.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] vxlan: fix incorrect initializer in union vxlan_addr
Date: Fri, 22 Aug 2014 19:55:35 -0700 (PDT) [thread overview]
Message-ID: <20140822.195535.1578874146066452604.davem@davemloft.net> (raw)
In-Reply-To: <53F79B38.8070806@linux.vnet.ibm.com>
From: Gerhard Stenzel <gstenzel@linux.vnet.ibm.com>
Date: Fri, 22 Aug 2014 21:34:16 +0200
> The first initializer in the following
>
> union vxlan_addr ipa = {
> .sin.sin_addr.s_addr = tip,
> .sa.sa_family = AF_INET,
> };
>
> is optimised away by the compiler, due to the second initializer,
> therefore initialising .sin.sin_addr.s_addr always to 0.
> This results in netlink messages indicating a L3 miss never contain the
> missed IP address. This was observed with GCC 4.8 and 4.9. I do not know about previous versions.
> The problem affects user space programs relying on an IP address being
> sent as part of a netlink message indicating a L3 miss.
>
> Changing
> .sa.sa_family = AF_INET,
> to
> .sin.sin_family = AF_INET,
> fixes the problem.
>
> Signed-off-by: Gerhard Stenzel <gerhard.stenzel@de.ibm.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2014-08-23 2:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 19:34 [PATCH v2 net] vxlan: fix incorrect initializer in union vxlan_addr Gerhard Stenzel
2014-08-23 2:55 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140822.195535.1578874146066452604.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gstenzel@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).