* Marco Pfatschbacher <[email protected]> [2011-09-06 15:47]:
> Oh, nice catch!
ideed.
> But I'd prefer to fix this with M_ZERO.
also indeed :) ok.
> Index: ip_carp.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet/ip_carp.c,v
> retrieving revision 1.189
> diff -p -u -p -u -r1.189 ip_carp.c
> --- ip_carp.c 8 Jul 2011 19:07:18 -0000 1.189
> +++ ip_carp.c 6 Sep 2011 13:40:09 -0000
> @@ -1820,7 +1820,7 @@ carp_set_ifp(struct carp_softc *sc, stru
> return (EINVAL);
>
> if (ifp->if_carp == NULL) {
> - ncif = malloc(sizeof(*cif), M_IFADDR, M_NOWAIT);
> + ncif = malloc(sizeof(*cif), M_IFADDR, M_NOWAIT|M_ZERO);
> if (ncif == NULL)
> return (ENOBUFS);
> if ((error = ifpromisc(ifp, 1))) {
>
--
Henning Brauer, [email protected], [email protected]
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/