diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2004-12-18 00:52:22 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2004-12-18 00:52:22 +0000 |
commit | a20f870c5b344d1e5ece5064cd0e928ea4f4a699 (patch) | |
tree | 7bf55dfd42bb1a180888d4d1ae3ac5a0611c4a4d /sys/netinet | |
parent | 99d7dcfaebd2ecebe66f06f9beba9b6591b31d8a (diff) |
Decrement carp_suppress_preempt when detaching an interface that has
been experiencing output errors.
ok mcbride@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 629d69fb17d..500a76b8d77 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.84 2004/12/17 21:40:04 mpf Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.85 2004/12/18 00:52:21 pascoe Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -761,6 +761,10 @@ carpdetach(struct carp_softc *sc) carp_suppress_preempt--; sc->sc_suppress = 0; + if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) + carp_suppress_preempt--; + sc->sc_sendad_errors = 0; + carp_set_state(sc, INIT); sc->sc_ac.ac_if.if_flags &= ~IFF_UP; carp_setrun(sc, 0); |