summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sockopt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 1f9f5275..6e1feece 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -313,6 +313,7 @@ setsockopt_ipv4_multicast_if(int sock,
#ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX
struct ip_mreqn mreqn;
+ memset (&mreqn, 0, sizeof(mreqn));
mreqn.imr_ifindex = ifindex;
return setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, (void *)&mreqn, sizeof(mreqn));