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")
This commit is contained in:
Bjoern A. Zeeb 2020-06-17 21:04:38 +00:00
parent b7b3d237e7
commit ce19cceb8d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362289

View File

@ -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;