From 719a11cdbf57b7bdd6c87ded00fd7cb36a76a6a3 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 13 Mar 2015 11:00:58 +0900 Subject: [PATCH] vxlan: Don't set s_addr in vxlan_create_sock In the case of AF_INET s_addr was set to INADDR_ANY (0) which which both symmetric with the AF_INET6 case, where s_addr is not set, and unnecessary as udp_conf is zeroed out earlier in the same function. I suspect this change does not have any run-time effect due to compiler optimisations. But it does make the code a little easier on the/my eyes. Cc: Tom Herbert Signed-off-by: Simon Horman Signed-off-by: David S. Miller --- drivers/net/vxlan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 1e0a775ea882..25d92d4fc625 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2516,7 +2516,6 @@ static struct socket *vxlan_create_sock(struct net *net, bool ipv6, !(flags & VXLAN_F_UDP_ZERO_CSUM6_RX); } else { udp_conf.family = AF_INET; - udp_conf.local_ip.s_addr = INADDR_ANY; } udp_conf.local_udp_port = port; -- 2.45.2