Kill dead code, what does a negative number of addresses on a carp(4)
authormpi <mpi@openbsd.org>
Mon, 30 Jun 2014 07:02:22 +0000 (07:02 +0000)
committermpi <mpi@openbsd.org>
Mon, 30 Jun 2014 07:02:22 +0000 (07:02 +0000)
mean?

ok deraadt@

sys/netinet/ip_carp.c

index 10b2c6f..0c50adc 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ip_carp.c,v 1.229 2014/04/30 10:04:33 mpi Exp $       */
+/*     $OpenBSD: ip_carp.c,v 1.230 2014/06/30 07:02:22 mpi Exp $       */
 
 /*
  * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1697,24 +1697,6 @@ carp_set_ifp(struct carp_softc *sc, struct ifnet *ifp)
                if (sc->sc_carpdev != NULL)
                        carpdetach(sc);
 
-               /* join multicast groups */
-               if (sc->sc_naddrs < 0 &&
-                   (error = carp_join_multicast(sc)) != 0) {
-                       if (ncif != NULL)
-                               free(ncif, M_IFADDR);
-                       return (error);
-               }
-
-#ifdef INET6
-               if (sc->sc_naddrs6 < 0 &&
-                   (error = carp_join_multicast6(sc)) != 0) {
-                       if (ncif != NULL)
-                               free(ncif, M_IFADDR);
-                       carp_multicast_cleanup(sc);
-                       return (error);
-               }
-#endif
-
                /* attach carp interface to physical interface */
                if (ncif != NULL)
                        ifp->if_carp = (caddr_t)ncif;