From ce19cceb8dbe3b9600d8f9174e86ed4f6ec44956 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Wed, 17 Jun 2020 21:04:38 +0000 Subject: [PATCH] When converting the static arrays to mallocarray() in r356621 I missed one place where we now need to multiply the size of the struct with the number of entries. This lead to problems when restarting user space daemons, as the cleanup was never properly done, resulting in MRT_ADD_VIF EADDRINUSE. Properly zero all array elements to avoid this problem. PR: 246629, 206583 Reported by: (many) MFC after: 4 days Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") --- sys/netinet/ip_mroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 727a7c2a82e3..d24b0f5bd66a 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -740,7 +740,7 @@ X_ip_mrouter_done(void) if_allmulti(ifp, 0); } } - bzero((caddr_t)V_viftable, sizeof(V_viftable)); + bzero((caddr_t)V_viftable, sizeof(V_viftable) * MAXVIFS); V_numvifs = 0; V_pim_assert_enabled = 0;