OpenBSD CVS

CVS log for src/usr.sbin/hoststated/Attic/hoststated.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.87, Fri Dec 7 17:27:07 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.86: +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.86 / (download) - annotate - [select for diffs], Mon Nov 26 09:38:25 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.85: +9 -1 lines
Diff to previous 1.85 (colored)

allow to add labels to protocol actions, they will be printed in http
error pages and can be used to refer to additional information.

ok pyr@

Revision 1.85 / (download) - annotate - [select for diffs], Sat Nov 24 16:13:50 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.84: +3 -1 lines
Diff to previous 1.84 (colored)

extend the url lookup algorithm to match the full URL and different
possible suffix/prefix combinations by stripping subdomains, path
components, and the query args.

ok and tested by gilles@

Revision 1.84 / (download) - annotate - [select for diffs], Fri Nov 23 09:39:42 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.83: +5 -3 lines
Diff to previous 1.83 (colored)

re-implement the "mark" action and document it in the manpage:
it is possible to attach a mark to a session based on matching an
entity (header, url, cookie, ...) and add conditional action for this
mark. it works a bit like the tag/tagged keywords in pf, but i decided
to pick a different name to avoid confusion.

ok pyr@ gilles@

Revision 1.83 / (download) - annotate - [select for diffs], Thu Nov 22 16:38:25 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

shuffle some structure elements; avoid using enums in *_config structs.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Nov 22 16:07:03 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored)

Fix relay roundrobin mode to work correctly when multiple hosts in a
table are down.

Thanks to Preston Norvell at serialssolutions dot com for reporting
the problem.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Nov 22 10:09:53 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.80: +6 -2 lines
Diff to previous 1.80 (colored)

add (new) "url" protocol action, this can be used to match/filter URL
suffix/prefix expressions like "example.com/index.html?args". a digest
mode allows to match against anonymized SHA1/MD5 digests of
suffix/prefix expressions.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Nov 21 20:28:38 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.79: +6 -6 lines
Diff to previous 1.79 (colored)

spacing

Revision 1.79 / (download) - annotate - [select for diffs], Wed Nov 21 20:13:20 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.78: +5 -3 lines
Diff to previous 1.78 (colored)

move digest string handling into an extra function.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Nov 21 14:12:04 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

rename the "url" filter action to "query" to use the correct term.
please update your hoststated.conf configurations. also add more
examples to the manpage.

alright pyr@

Revision 1.77 / (download) - annotate - [select for diffs], Wed Nov 21 13:04:42 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.76: +7 -1 lines
Diff to previous 1.76 (colored)

allow the http digest type to be either SHA1 or MD5 determined by the
digest string length; it is compatible to any existing SHA1-only
configurations.

ok pyr@ gilles@

Revision 1.76 / (download) - annotate - [select for diffs], Tue Nov 20 15:54:55 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.75: +5 -1 lines
Diff to previous 1.75 (colored)

it may be desirable to send a HTTP error page with error code and a
meaningful message if a HTTP/HTTPS relay closes the connection for
some reason. for example, a "403 Forbidden" if the request was
rejected by a filter. this will be enabled with the "return error"
option and is disabled by default, the standard behaviour is to
silently drop the connection; the browser may display an empty page in
this case. the look+feel of the HTTP error page can be customized with
a CSS style sheet, but we do not intend to allow customization of the
error page contents (hoststated is not a webserver!).

ok pyr@

Revision 1.75 / (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.74: +3 -1 lines
Diff to previous 1.74 (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.74 / (download) - annotate - [select for diffs], Tue Nov 20 13:01:13 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

bump table name size.
ok reyk@

Revision 1.73 / (download) - annotate - [select for diffs], Mon Nov 19 14:48:19 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.72: +14 -8 lines
Diff to previous 1.72 (colored)

rework the internal handling of protocol actions a little bit:

- allow to use a key for multiple times by appending a queue of
additional matches to the tree node. for example, this allows to
specify multiple "expect" or "filter" actions to white-/black-list
a list of HTTP-headers, URLs, ..

- prevent specifing an HTTP header for multiple times when using the
expect action.

- minor code shuffling

Revision 1.72 / (download) - annotate - [select for diffs], Wed Nov 14 10:59:01 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

make protos dynamic too

Revision 1.71 / (download) - annotate - [select for diffs], Mon Oct 22 16:53:30 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored)

load certificates text at parse time. then load them in relay processes.
this separation will ease reload a bit more.

ok reyk@ who spotted a stupid mistake again...

Revision 1.70 / (download) - annotate - [select for diffs], Fri Oct 19 14:15:14 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Move relays from static TAILQs to allocated ones.
This syncs it with other hoststated entities and will make reload easier.
This is step 1 out of 7 for reload.

Revision 1.69 / (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.68: +3 -2 lines
Diff to previous 1.68 (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.68 / (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.67: +3 -3 lines
Diff to previous 1.67 (colored)

Silence some lint(1) warnings

ok pyr@

Revision 1.67 / (download) - annotate - [select for diffs], Fri Oct 5 17:32:13 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.66: +8 -7 lines
Diff to previous 1.66 (colored)

stylistic changes in the relay/relay_config structure.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Oct 5 15:50:12 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

using an enum in the imsg_hdr is gross, use a fixed u_int16_t instead

Revision 1.65 / (download) - annotate - [select for diffs], Tue Oct 2 21:04:13 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored)

stop messing with lgetc to please hoststated's check/expect.
instead move some of the logic in yylex and do hoststated specific
translations into hoststated.c
ok gilles@

Revision 1.64 / (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.63: +2 -2 lines
Diff to previous 1.63 (colored)

Correct my mail address.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Sep 28 13:05:28 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.62: +7 -5 lines
Diff to previous 1.62 (colored)

Change the ssl_privsep code to work on char buffers.
The fd based code introduced weirdness since all children were accessing
the same fd at once. This will also greatly facilitate reloading, no
fd-passing will be involved between the parent and relay children.

While there, cleanup the code diverting from the original ssl_rsa.c code
a bit more.

Weird behavior discovery by pascoe@.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Sep 27 13:34:21 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.61: +5 -2 lines
Diff to previous 1.61 (colored)

Simplify ssl_privsep.c, since it won't need to remain synced with the
equivalent openssl functions.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Sep 25 08:24:26 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.60: +5 -1 lines
Diff to previous 1.60 (colored)

Introduce two new functions to be able to load certificates while
already chrooted and with privileges dropped.
This is the very first step in being able to reload a
layer 7 configuration.

not ok reyk who's away but should be glad to see this in.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Sep 10 11:59:22 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.59: +16 -2 lines
Diff to previous 1.59 (colored)

add support for relaying DNS traffic (with a little bit of packet
header randomization). this adds an infrastructure to support
UDP-based protocols.

ok gilles@, tested by some

Revision 1.59 / (download) - annotate - [select for diffs], Fri Sep 7 08:20:24 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored)

add an interface to dump running relay sessions to the control socket

Revision 1.58 / (download) - annotate - [select for diffs], Fri Sep 7 07:59:18 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored)

remove unused flags field from the structure

Revision 1.57 / (download) - annotate - [select for diffs], Fri Sep 7 07:52:14 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (colored)

add a function to print delays in hours, minutes, and seconds

Revision 1.56 / (download) - annotate - [select for diffs], Thu Sep 6 19:55:45 2007 UTC (16 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

rename relay_host to print_host in log.c

Revision 1.55 / (download) - annotate - [select for diffs], Wed Sep 5 08:48:42 2007 UTC (16 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.54: +10 -4 lines
Diff to previous 1.54 (colored)

store relay sessions in SPLAY trees instead of TAILQ lists. this will
be used for faster lookups of sessions based on different criteria.

ok pyr@

Revision 1.54 / (download) - annotate - [select for diffs], Wed Sep 5 07:32:33 2007 UTC (16 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

increase th maximum string size for the sslciphers from 32 to 768.
this unbreaks some configurations that worked when sslciphers was a
dynamic charbuf.

ok pyr@

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jun 18 17:29:38 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.52: +23 -23 lines
Diff to previous 1.52 (colored)

we're going to need more room for flags (again).
promote the field to u_int32_t.
no impact on hoststatectl.

Revision 1.52 / (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.51: +9 -2 lines
Diff to previous 1.51 (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.51 / (download) - annotate - [select for diffs], Thu May 31 03:24:05 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (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.50 / (download) - annotate - [select for diffs], Tue May 29 23:19:18 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

allow the control handling code to send messages back to the parent.
forward IMSG_CTL_RELOAD which ends up not doing anything for now.

Revision 1.49 / (download) - annotate - [select for diffs], Tue May 29 19:05:13 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.48: +12 -1 lines
Diff to previous 1.48 (colored)

put the reload imsg types in right now. it makes my life easier.

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 29 17:12:04 2007 UTC (17 years ago) by reyk
Branch: MAIN
Changes since 1.47: +15 -3 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Tue May 29 00:48:04 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

move the ssl cipher suite string to a (small) static charbuf,
this will make it easier to send the struct over the socket.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 29 00:21:10 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.45: +18 -12 lines
Diff to previous 1.45 (colored)

move struct relay to the runtime + config scheme.
this time around, include hoststatectl changes too.

Revision 1.45 / (download) - annotate - [select for diffs], Mon May 28 22:11:33 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.44: +8 -1 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Mon May 28 17:37:16 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.43: +2 -1 lines
Diff to previous 1.43 (colored)

store the configuration file's path, this will be useful when reloading.

Revision 1.43 / (download) - annotate - [select for diffs], Sun May 27 20:53:10 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.42: +31 -17 lines
Diff to previous 1.42 (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.42 / (download) - annotate - [select for diffs], Sat May 26 19:58:49 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.41: +12 -10 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Thu Apr 12 14:45:45 2007 UTC (17 years, 1 month ago) by reyk
Branch: MAIN
Changes since 1.40: +4 -2 lines
Diff to previous 1.40 (colored)

add a new relay 'path' action to filter the URL path and arguments.

ok pyr@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 10 21:33:52 2007 UTC (17 years, 1 month ago) by reyk
Branch: MAIN
Changes since 1.39: +5 -1 lines
Diff to previous 1.39 (colored)

move the decoding of the URL, independent from the node lookups, we
will need it later.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 21 00:08:08 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

in addition to the host retry option in tables, add support for the
optional connection "retry" to the forward to, service, and nat lookup
options. for example, "nat lookup retry 3" is useful when running
hoststated as a transparent proxy when connecting to unreliable
frontend/backend servers.

ok pyr@

Revision 1.38 / (download) - annotate - [select for diffs], Sat Mar 17 22:28:42 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

move some elements in the relay imsg ctl structures (just for the style)

Revision 1.37 / (download) - annotate - [select for diffs], Tue Mar 13 12:04:52 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.36: +5 -1 lines
Diff to previous 1.36 (colored)

allow to specify the IP_TTL and IP_MINTTL options for the relays to
support the Generalized TTL Security Mechanism (GTSM) according to RFC
3682. this is especially useful with inbound connections and a fixed
distance to the backend servers.

ok pyr@

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 5 11:44:50 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.35: +7 -1 lines
Diff to previous 1.35 (colored)

do not strip the header for expect, hash, and log actions.

since we have a tristate in relay_handle_http(), use nicer return
codes defined to make it better readble (no function change).

Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 27 13:38:58 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.34: +14 -4 lines
Diff to previous 1.34 (colored)

in addition to actions on request headers, allow to define relay
actions on response headers (the reply sent by backend HTTP servers).
the default and slightly faster relay streaming mode will be used if
no actions are defined.

for example:
response change "Server" to "OpenBSD-hoststated/4.1"

ok pyr@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Feb 26 12:35:43 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

handle requests with chunked transfer-encoding.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Feb 26 12:09:21 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

improve the relay bufferevent handler if one side closed the connection

Revision 1.32 / (download) - annotate - [select for diffs], Mon Feb 26 11:59:48 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored)

re-use the retry value from table host entries for inbound relay
connections. the relay will retry to connect to the hosts for the
specified number of times. this sounds bad, but is a useful
"workaround" for unreliable backend servers...

Revision 1.31 / (download) - annotate - [select for diffs], Sun Feb 25 14:57:09 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

remove unused variable

Revision 1.30 / (download) - annotate - [select for diffs], Sat Feb 24 16:14:02 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

disable anonymous DH by default (cipher suite HIGH:!ADH instead of HIGH).

Revision 1.29 / (download) - annotate - [select for diffs], Sat Feb 24 15:48:54 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

disable SSLv2 and use "HIGH" crypto cipher suites by default.

suggested by dlg@

Revision 1.28 / (download) - annotate - [select for diffs], Sat Feb 24 00:22:32 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.27: +32 -9 lines
Diff to previous 1.27 (colored)

- allow to specify the SSL cipher suite and the SSL protocols
  (as required by the PCI DSS)
- increase the default listen backlog to 10, allow to modify the
  backlog as a per-protocol tcp option to improve the performance
  on busy systems (to get less connection failures on heavy load)
- close the connection if SSL_accept returned an error
- instead of logging _new_ relay sessions to syslog, log the
  sessions in relay_close() after they have been _finished_.
  this will allow to collect some additional information
- add a new log keyword to log specified header/url entities (useful
  to track "bad guys" using many session ids or multiple user agents)
- some minor fixes, manpage bits, and bump the copyright (by some
  reason, i didn't realize that we already have 2007...).

Revision 1.27 / (download) - annotate - [select for diffs], Fri Feb 23 00:28:06 2007 UTC (17 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

knf

Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 22 05:58:06 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.25: +11 -11 lines
Diff to previous 1.25 (colored)

spacing

Revision 1.25 / (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.24: +240 -5 lines
Diff to previous 1.24 (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.24 / (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.23: +21 -12 lines
Diff to previous 1.23 (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.23 / (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.22: +1 -3 lines
Diff to previous 1.22 (colored)

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

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

add the -D option to define macros on the command line (as found in
bgpd(8), hostapd(8), ipsecctl(8), pfctl(8), ...).

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 6 10:26:13 2007 UTC (17 years, 3 months ago) by pyr
Branch: MAIN
Changes since 1.20: +1 -8 lines
Diff to previous 1.20 (colored)

now that check_http_code, check_http_digest and check_send_expect are
in check_tcp.c, prototype them in check_tcp.c
ok reyk@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 6 10:06:55 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

declare the function ssl_error() globally

Revision 1.19 / (download) - annotate - [select for diffs], Tue Feb 6 08:45:46 2007 UTC (17 years, 3 months ago) by pyr
Branch: MAIN
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

inform hoststatectl monitor of ruleset changes and table syncs.
ok reyk@

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 1 20:03:39 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.17: +6 -3 lines
Diff to previous 1.17 (colored)

add a monitor mode to hoststatectl to continuously report changes in
hoststated.
ok reyk@, "looks nice and clean" niallo@

Revision 1.17 / (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.16: +11 -1 lines
Diff to previous 1.16 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 12 17:05:18 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.15: +15 -15 lines
Diff to previous 1.15 (colored)

use an u_int16_t for flags, the u_int8_t was getting too small.
ok reyk@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 12 16:43:01 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.14: +8 -4 lines
Diff to previous 1.14 (colored)

eliminate duplicate tcp read/write code.
ok claudio@, reyk@

Revision 1.14 / (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.13: +26 -17 lines
Diff to previous 1.13 (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.13 / (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.12: +45 -45 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Tue Jan 9 03:32:56 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

use the correct buffer sizes.

(this code needs some more work to implement a better icmp handling,
but this will fix a serious bug for now)

Revision 1.11 / (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.10: +1 -2 lines
Diff to previous 1.10 (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.10 / (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.9: +2 -2 lines
Diff to previous 1.9 (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.9 / (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.8: +8 -1 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Wed Jan 3 09:45:29 2007 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

spacing

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 3 09:42:30 2007 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

allow the sticky-address option for round-robin pools.

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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Dec 26 02:51:00 2006 UTC (17 years, 5 months ago) by jsg
Branch: MAIN
Changes since 1.5: +2 -0 lines
Diff to previous 1.5 (colored)

Add missing $OpenBSD$

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 25 19:05:41 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

fix the conversion from milliseconds to struct timeval, which uses
seconds (tv_sec) and microseconds (tv_usec), but the code assumed
seconds and milliseconds...

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: +34 -9 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 18:50:33 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.2: +19 -9 lines
Diff to previous 1.2 (colored)

- allow to use host/service/table names instead of Ids in hostatectl.
- minor change of the "hostatectl show" command output
- increase the max service and tag names (max pf tag name size is 64 now!)

thanks to pyr who found a bug in my initial diff

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: +89 -86 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.