summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_carp.c
diff options
context:
space:
mode:
authorCamiel Dobbelaar <camield@cvs.openbsd.org>2011-10-24 17:48:32 +0000
committerCamiel Dobbelaar <camield@cvs.openbsd.org>2011-10-24 17:48:32 +0000
commitc04fa5838cfef315fbef75dc7faf049a6b8e73aa (patch)
tree2f04ab200faa29a0dbc32aa6bba1a2a378e07f45 /sys/netinet/ip_carp.c
parent6ccea7fa32be20b381f43cec076314b21037447f (diff)
Lower carp demote count on interface detach, fixes a bug introduced by rev 1.175.
ok henning mpf
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r--sys/netinet/ip_carp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 2337fbe9a9a..008bc9cb617 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.191 2011/10/16 21:07:19 mpf Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.192 2011/10/24 17:48:31 camield Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -980,7 +980,7 @@ carpdetach(struct carp_softc *sc)
carp_del_all_timeouts(sc);
if (sc->sc_demote_cnt)
- carp_group_demote_adj(&sc->sc_if, sc->sc_demote_cnt, "detach");
+ carp_group_demote_adj(&sc->sc_if, -sc->sc_demote_cnt, "detach");
sc->sc_suppress = 0;
sc->sc_sendad_errors = 0;