netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zyjzyj2000@gmail.com
To: netdev@vger.kernel.org, pabeni@redhat.com, daniel@iogearbox.net,
	pshelar@nicira.com, aduyck@mirantis.com,
	hannes@stressinduktion.org, jbenc@redhat.com,
	davem@davemloft.net, zyjzyj2000@gmail.com
Subject: [PATCH 1/1] vxlan: insert ipv6 macro
Date: Tue, 11 Oct 2016 16:23:31 +0800	[thread overview]
Message-ID: <1476174211-9358-1-git-send-email-zyjzyj2000@gmail.com> (raw)

From: Zhu Yanjun <zyjzyj2000@gmail.com>

The source code is related with ipv6. As such, it is better to insert
ipv6 macro.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/net/vxlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index e7d1668..9af6600 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2647,15 +2647,15 @@ static struct socket *vxlan_create_sock(struct net *net, bool ipv6,
 	int err;
 
 	memset(&udp_conf, 0, sizeof(udp_conf));
-
+#if IS_ENABLED(CONFIG_IPV6)
 	if (ipv6) {
 		udp_conf.family = AF_INET6;
 		udp_conf.use_udp6_rx_checksums =
 		    !(flags & VXLAN_F_UDP_ZERO_CSUM6_RX);
 		udp_conf.ipv6_v6only = 1;
-	} else {
+	} else 
+#endif
 		udp_conf.family = AF_INET;
-	}
 
 	udp_conf.local_udp_port = port;
 
-- 
2.7.4

             reply	other threads:[~2016-10-11 13:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11  8:23 zyjzyj2000 [this message]
2016-10-11 14:06 ` [PATCH 1/1] vxlan: insert ipv6 macro Jiri Benc
2016-10-12 13:01   ` zhuyj
2016-10-12 13:16     ` Jiri Benc
2016-10-13  5:28       ` zhuyj
2016-10-13  5:30         ` zhuyj

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=1476174211-9358-1-git-send-email-zyjzyj2000@gmail.com \
    --to=zyjzyj2000@gmail.com \
    --cc=aduyck@mirantis.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pshelar@nicira.com \
    /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).