svn commit: r362289 - head/sys/netinet

Bjoern A. Zeeb bz at FreeBSD.org
Wed Jun 17 21:04:39 UTC 2020


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;
 


More information about the svn-src-all mailing list