netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] vxlan: insert ipv6 macro
@ 2016-10-11  8:23 zyjzyj2000
  2016-10-11 14:06 ` Jiri Benc
  0 siblings, 1 reply; 6+ messages in thread
From: zyjzyj2000 @ 2016-10-11  8:23 UTC (permalink / raw)
  To: netdev, pabeni, daniel, pshelar, aduyck, hannes, jbenc, davem,
	zyjzyj2000

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-13  5:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11  8:23 [PATCH 1/1] vxlan: insert ipv6 macro zyjzyj2000
2016-10-11 14:06 ` 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

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).