OpenBSD CVS

CVS log for src/usr.sbin/hoststated/Attic/hce.c


[BACK] Up to [local] / src / usr.sbin / hoststated

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37, Fri Dec 7 17:27:07 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.36: +1 -1 lines
FILE REMOVED

hoststated/hoststatectl get repository copied (and de-tagged) into
relayd/relayctl.  This is a more suitable place for a daemon that has
grown out of it's initial roots of "monitoring and redirecting services
at various layers", into one that is "a full featured proxy, which
happens to know what is up/down"

Revision 1.36 / (download) - annotate - [select for diffs], Sat Nov 24 17:07:28 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.35: +5 -4 lines
Diff to previous 1.35 (colored)

sort includes, adjust to style(9)

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 21 09:54:39 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored)

make sure all hosts are checked when hoststatectl poll is issued, now
that check interval can differ from table to table.
ok reyk@

Revision 1.34 / (download) - annotate - [select for diffs], Tue Nov 20 15:44:21 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.33: +7 -1 lines
Diff to previous 1.33 (colored)

Allow overriding the global interval in a table.
Table specific intervals must be multiples of the global interval.
help and ok reyk@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Nov 19 15:31:36 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

spacing

Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 19 12:08:55 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.31: +5 -1 lines
Diff to previous 1.31 (colored)

Add the ability to schedule an immediate check through hoststatectl.
Especially useful when interval is rather long.
I was supposed to commit this before 4.2.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 12 12:50:59 2007 UTC (16 years, 7 months ago) by blambert
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Silence some lint(1) warnings

ok pyr@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Sep 28 13:29:56 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Correct my mail address.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jun 19 13:06:00 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.28: +2 -7 lines
Diff to previous 1.28 (colored)

don't go through the effort of creating a SIGHUP handler through
libevent just to ignore it, use SIG_IGN instead.
this syncs hoststated with bgpd and (soon) ospfd.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jun 19 06:29:20 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
Changes since 1.27: +13 -5 lines
Diff to previous 1.27 (colored)

Do not fatal out with ``pipe closed'' when a short read occurs on one
of our socket pairs. Instead disable listening on the pipe, terminate the
event loop, and let the parent process's SIGCHLD handler do a clean
shutdown.

from an ospfd diff by claudio, ok claudio@

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jun 12 15:16:10 2007 UTC (16 years, 11 months ago) by msf
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

put the fd passing from bgpd back in to hoststated's version of imsg,
needed for layer 7 reload support.

ok pyr@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jun 7 07:19:50 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
Changes since 1.25: +53 -1 lines
Diff to previous 1.25 (colored)

(finally) Enable reload support for layer 3 configurations.
Hoststated can be reloaded either by sending SIGHUP to the parent process
or by using ``hoststatectl reload''
discussed and ok reyk@

Revision 1.25 / (download) - annotate - [select for diffs], Thu May 31 05:07:08 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.24: +53 -52 lines
Diff to previous 1.24 (colored)

split event registration between the ones that will be kept intact
at reconfiguration time.

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 31 03:26:36 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.23: +1 -7 lines
Diff to previous 1.23 (colored)

some silly debug code snuck in.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 31 03:24:05 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.22: +64 -24 lines
Diff to previous 1.22 (colored)

allocate table lists and service lists instead of using static structs.
split the code to start the event loop in two functions.
introduce merge_config which will be used later on.

Revision 1.22 / (download) - annotate - [select for diffs], Tue May 29 17:12:04 2007 UTC (17 years ago) by reyk
Branch: MAIN
Changes since 1.21: +31 -16 lines
Diff to previous 1.21 (colored)

add a new check method which allows to run external scripts/programs
for custom evaluations.

pyr agrees to put it in now but to do some improvements of the timeout
handling later.

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 28 22:11:33 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

another small step towards hoststated reloading.
allow purging of parts of the hoststated environment structure.
start using this function now to only keep vital information in
hoststated children processes.

ok reyk@

Revision 1.20 / (download) - annotate - [select for diffs], Sun May 27 20:53:10 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.19: +14 -14 lines
Diff to previous 1.19 (colored)

Second step towards hoststated reload:
First split out hosts, tables and services into to structs, one that
contains the runtime fields and one (inside the runtime) that contains
mostly static fields that will be sent over the socket during reload.

Also move the demoted field of tables inside the flags field as its
just a boolean.
ok reyk@

Revision 1.19 / (download) - annotate - [select for diffs], Sat May 26 19:58:48 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

first steps for implementing reload:
	* make parse_config allocate the hoststated function by itself
	* make as many sockets as necessary to talk to the relay children
	* add send_all for talking to all children
with advise and ok reyk@

Revision 1.18 / (download) - annotate - [select for diffs], Wed Mar 7 17:40:32 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

- fix the hoststatectl host disable/enable commands to work with relay
layer 7 loadbalancing.
- allow to run relays with tables without depending on services
- show hosts and tables assigned to relays in hoststatectl show commands

ok pyr@ deraadt@ with some input from mcbride@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 6 19:37:31 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

fix the health checks when using the retry option

Revision 1.16 / (download) - annotate - [select for diffs], Thu Feb 22 03:32:39 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.15: +43 -14 lines
Diff to previous 1.15 (colored)

Add layer 7 functionality to hoststated used for layer 7
loadbalancing, SSL acceleration, general-purpose TCP relaying, and
transparent proxying.

see hoststated.conf(5) and my upcoming article on undeadly.org for
details.

ok to commit deraadt@ pyr@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 7 15:17:46 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.14: +28 -2 lines
Diff to previous 1.14 (colored)

add new "log (updates|all)" configuration option to log state
notifications after completed host checks.  either only log the
"updates" to new states or log "all" state notifications, even if the
state didn't change. the log messages will be reported to syslog or to
stderr if the daemon is running in foreground mode.

ok claudio@ pyr@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Feb 7 14:39:45 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.13: +1 -3 lines
Diff to previous 1.13 (colored)

remove superfluos log_debug() messages

ok pyr@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Feb 7 13:39:58 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.12: +1 -21 lines
Diff to previous 1.12 (colored)

remove unused functions and variables which have been copied from
ospfd(8) (can be re-imported later if required).

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jan 29 14:23:31 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.11: +13 -1 lines
Diff to previous 1.11 (colored)

Add SSL support to hoststated.
with help and OK reyk@
with help and advice by claudio@ and Srebrenko Sehic

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 24 10:26:00 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Similar to ospfd and ripd ignore SIGPIPE in all processes to be able to do
a nice exit in case one of the processes dies. OK pyr@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 11 18:05:08 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.9: +38 -45 lines
Diff to previous 1.9 (colored)

use real async events for checks and improve the non-blocking socket
usage. also modify the check_icmp code to use non-blocking raw sockets
and merge the icmp4 and icmp6 functions. some other minor changes
while i'm here.

as discussed with pyr@ claudio@ deraadt@
ok pyr@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jan 9 13:50:11 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Finish renaming hostated to hoststated.
Note to testers: the user the daemon changes its id to is now _hoststated,
don't forget to update master.passwd.
ok reyk@

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jan 9 00:45:32 2007 UTC (17 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

adapt to rename

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jan 8 20:46:18 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)

do NOT use the regexp interface. it is way to complicated, error-prone
and we don't know about all the possible security problems.

change the check send/expect code to use the fnmatch(3) interface
using shell globbing rules instead. this allows simple patterns like
"220 * ESMTP*" or "SSH-[12].??-*".

suggested by deraadt@ and otto@
ok Pierre-Yves Ritschard (pyr at spootnik dot org)

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jan 8 16:52:58 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.5: +3 -5 lines
Diff to previous 1.5 (colored)

the timeout values are not allowed to exceed the global interval (i
figured this out while testing hostated against a stottering spamd
where the send/expect timeout needs be > 10 seconds). also use another
struct timeval to store the interval for easier handling in the code.

ok Pierre-Yves Ritschard (pyr at spootnik dot org)

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 8 13:37:26 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

add a generic send/expect check using regular expression (see
regex(3)).  this allows to define additional checks for other TCP
protocols.

From Pierre-Yves Ritschard (pyr at spootnik dot org)

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 25 18:12:14 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.3: +79 -36 lines
Diff to previous 1.3 (colored)

partial rewrite of the check_* routines to use libevent everywhere
instead of nested select() calls and to handle the non-blocking
sockets properly.

From Pierre-Yves Ritschard (pyr at spootnik dot org)
(with a little help by me)

Revision 1.3 / (download) - annotate - [select for diffs], Sat Dec 16 17:48:27 2006 UTC (17 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

spacing

Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 16 12:42:14 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.1: +67 -68 lines
Diff to previous 1.1 (colored)

knf, spacing

please note that some editors will replace tabs with multiple spaces
if you cut & paste code from other sections.  please try to keep the
tabs ;).

Revision 1.1 / (download) - annotate - [select for diffs], Sat Dec 16 11:45:07 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN

Import hostated, the host status daemon.  This daemon will monitor
remote hosts and dynamically alter pf(4) tables and redirection rules
for active server load balancing.  The daemon has been written by
Pierre-Yves Ritschard (pyr at spootnik.org) and was formerly known as
"slbd".

The daemon is fully functional but it still needs some work and
cleanup so we don't link it to the build yet.  Some TODOs are a
partial rewrite of the check_* routines (use libevent whenever we
can), improvement of the manpages, and general knf and cleanup.

ok deraadt@ claudio@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.