From: Zhu Yanjun <zyjzyj2...@gmail.com> The source code is related with ipv6. As such, it is better to insert ipv6 macro.
Signed-off-by: Zhu Yanjun <zyjzyj2...@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