summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2003-10-27 06:23:58 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2003-10-27 06:23:58 +0000
commit2bb37f2cb12dfbdec6aad731279ff09962d8616b (patch)
tree5f448f04fc3a19cf033f988b480381d5e55dccae
parentb7e1d9e96eedda258e68fdd9bd86963719fff49a (diff)
Also check if we're going down before scheduling an advertisement
when we fail to get an mbuf. This too is courtesy of Max Laier.
-rw-r--r--sys/netinet/ip_carp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 86f1aec1fcb..80bccfda4aa 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.9 2003/10/27 06:13:43 mcbride Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.10 2003/10/27 06:23:57 mcbride Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -552,7 +552,8 @@ carp_send_ad(void *v)
sc->sc_ac.ac_if.if_oerrors++;
carpstats.carps_onomem++;
/* XXX maybe less ? */
- timeout_add(&sc->sc_ad_tmo, hz * sc->sc_advbase);
+ if (advbase != 255 || advskew != 255)
+ timeout_add(&sc->sc_ad_tmo, hz * sc->sc_advbase);
return;
}
len = sizeof(*ip) + sizeof(*ch);