diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-11-24 13:57:06 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-11-24 13:57:06 +0000 |
commit | 4ab03335bc346784f79643145157623b6f4365b2 (patch) | |
tree | eeeb881a8b50af1ddd0d4db89ad173aee74cace1 /usr.sbin/relayd | |
parent | 95350a061065e906c08dfa8fe80294d3dc3deabd (diff) |
When disabling and enabling tables set the number of hosts that are up
to zero, consistent with pfe and makes other parts of the code better
behaved. From Patrik Lundin.
ok reyk@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r-- | usr.sbin/relayd/relay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index e7ddef25742..a9d9caff74b 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.124 2010/11/16 15:31:01 jsg Exp $ */ +/* $OpenBSD: relay.c,v 1.125 2010/11/24 13:57:05 jsg Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -2497,6 +2497,7 @@ relay_dispatch_pfe(int fd, short event, void *ptr) if ((table = table_find(env, id)) == NULL) fatalx("relay_dispatch_pfe: desynchronized"); table->conf.flags |= F_DISABLE; + table->up = 0; TAILQ_FOREACH(host, &table->hosts, entry) host->up = HOST_UNKNOWN; break; @@ -2505,6 +2506,7 @@ relay_dispatch_pfe(int fd, short event, void *ptr) if ((table = table_find(env, id)) == NULL) fatalx("relay_dispatch_pfe: desynchronized"); table->conf.flags &= ~(F_DISABLE); + table->up = 0; TAILQ_FOREACH(host, &table->hosts, entry) host->up = HOST_UNKNOWN; break; |