Date: Sun, 21 Jun 2020 11:48:55 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362465 - stable/12/sys/netinet Message-ID: <202006211148.05LBmtKI091427@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sun Jun 21 11:48:55 2020 New Revision: 362465 URL: https://svnweb.freebsd.org/changeset/base/362465 Log: MFC r362289: 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 Modified: stable/12/sys/netinet/ip_mroute.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/ip_mroute.c ============================================================================== --- stable/12/sys/netinet/ip_mroute.c Sun Jun 21 11:42:49 2020 (r362464) +++ stable/12/sys/netinet/ip_mroute.c Sun Jun 21 11:48:55 2020 (r362465) @@ -739,7 +739,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006211148.05LBmtKI091427>