Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2020 21:04:39 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r362289 - head/sys/netinet
Message-ID:  <202006172104.05HL4dTv074973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Wed Jun 17 21:04:38 2020
New Revision: 362289
URL: https://svnweb.freebsd.org/changeset/base/362289

Log:
  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")

Modified:
  head/sys/netinet/ip_mroute.c

Modified: head/sys/netinet/ip_mroute.c
==============================================================================
--- head/sys/netinet/ip_mroute.c	Wed Jun 17 20:58:37 2020	(r362288)
+++ head/sys/netinet/ip_mroute.c	Wed Jun 17 21:04:38 2020	(r362289)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006172104.05HL4dTv074973>