svn commit: r362465 - stable/12/sys/netinet

Bjoern A. Zeeb bz at FreeBSD.org
Sun Jun 21 11:48:55 UTC 2020


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;
     


More information about the svn-src-stable mailing list