Author: glebius
Date: Thu Oct 20 15:55:01 2011
New Revision: 226571
URL: http://svn.freebsd.org/changeset/base/226571

Log:
  MFhead r226367:
  
    Never switch directly from INIT to MASTER, since this produces
    nasty status flaps.
  
    PR:           kern/161123
    Submitted by: Damien Fleuriot <dam my.gd>
    OpenBSD:      ip_carp.c, rev. 1.115
  
  Approved by:  re (kib)

Modified:
  stable/9/sys/netinet/ip_carp.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/ip_carp.c
==============================================================================
--- stable/9/sys/netinet/ip_carp.c      Thu Oct 20 15:53:26 2011        
(r226570)
+++ stable/9/sys/netinet/ip_carp.c      Thu Oct 20 15:55:01 2011        
(r226571)
@@ -1424,24 +1424,10 @@ carp_setrun(struct carp_softc *sc, sa_fa
 
        switch (sc->sc_state) {
        case INIT:
-               if (carp_opts[CARPCTL_PREEMPT] && !carp_suppress_preempt) {
-                       carp_send_ad_locked(sc);
-#ifdef INET
-                       carp_send_arp(sc);
-#endif
-#ifdef INET6
-                       carp_send_na(sc);
-#endif /* INET6 */
-                       CARP_LOG("%s: INIT -> MASTER (preempting)\n",
-                           SC2IFP(sc)->if_xname);
-                       carp_set_state(sc, MASTER);
-                       carp_setroute(sc, RTM_ADD);
-               } else {
-                       CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname);
-                       carp_set_state(sc, BACKUP);
-                       carp_setroute(sc, RTM_DELETE);
-                       carp_setrun(sc, 0);
-               }
+               CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname);
+               carp_set_state(sc, BACKUP);
+               carp_setroute(sc, RTM_DELETE);
+               carp_setrun(sc, 0);
                break;
        case BACKUP:
                callout_stop(&sc->sc_ad_tmo);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to