Up to [local] / src / usr.sbin / hoststated
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.62, Fri Dec 7 17:27:07 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.61: +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.61 / (download) - annotate - [select for diffs], Wed Nov 28 11:37:59 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.60: +3 -1 lines
Diff to previous 1.60 (colored)
unref the label when free'ing a protocol node
Revision 1.60 / (download) - annotate - [select for diffs], Sun Nov 25 20:01:10 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.59: +39 -5 lines
Diff to previous 1.59 (colored)
in addition to IPv4/6 addresses, canonicalize the hostname for "url", for example ".www...Example.com." will be translated to "www.example.com". ok gilles@
Revision 1.59 / (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.58: +3 -2 lines
Diff to previous 1.58 (colored)
sort includes, adjust to style(9)
Revision 1.58 / (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.57: +23 -1 lines
Diff to previous 1.57 (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.57 / (download) - annotate - [select for diffs], Fri Nov 23 09:22:18 2007 UTC (16 years, 6 months ago) by sthen
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)
fix typo ok pyr@
Revision 1.56 / (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.55: +19 -1 lines
Diff to previous 1.55 (colored)
move digest string handling into an extra function.
Revision 1.55 / (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.54: +3 -1 lines
Diff to previous 1.54 (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.54 / (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.53: +5 -5 lines
Diff to previous 1.53 (colored)
spacing
Revision 1.53 / (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.52: +9 -1 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Mon Nov 19 11:39:49 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.51: +19 -22 lines
Diff to previous 1.51 (colored)
move repeated code to cleanup a protocol tree into a function.
Revision 1.51 / (download) - annotate - [select for diffs], Thu Nov 15 17:02:01 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.50: +1 -3 lines
Diff to previous 1.50 (colored)
Do not insert proto_default inside the dynamically alloced protocol queue. Handle it as a special case in the one place where it actually matters instead.
Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 14 11:01:52 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.49: +6 -2 lines
Diff to previous 1.49 (colored)
add some sanity, that will be useful later on.
Revision 1.49 / (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.48: +5 -4 lines
Diff to previous 1.48 (colored)
make protos dynamic too
Revision 1.48 / (download) - annotate - [select for diffs], Tue Nov 13 10:35:21 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)
relays are dynamic now.
Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 4 22:09:02 2007 UTC (16 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)
the last change to enable logging to stderr on startup also enabled annoying debugging messages on the console by default. since we do not want to see debugging messages unless specified by the "-d" flag, add an extra debugging level "debug > 1" to be checked in log_debug().
Revision 1.46 / (download) - annotate - [select for diffs], Fri Oct 19 14:40:51 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.45: +6 -3 lines
Diff to previous 1.45 (colored)
Do log initialisation correctly, like bgpd does. This removes the double warn/log_warn madness i introduced yesterday. This also keeps messages on stderr at startup and when running with -n.
Revision 1.45 / (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.44: +7 -6 lines
Diff to previous 1.44 (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.44 / (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.43: +2 -1 lines
Diff to previous 1.43 (colored)
Silence some lint(1) warnings ok pyr@
Revision 1.43 / (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.42: +3 -3 lines
Diff to previous 1.42 (colored)
stylistic changes in the relay/relay_config structure.
Revision 1.42 / (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.41: +29 -1 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Fri Sep 28 20:23:38 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)
KNF
Revision 1.40 / (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.39: +2 -2 lines
Diff to previous 1.39 (colored)
Correct my mail address.
Revision 1.39 / (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.38: +4 -4 lines
Diff to previous 1.38 (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.38 / (download) - annotate - [select for diffs], Thu Jul 5 09:42:26 2007 UTC (16 years, 11 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE,
OPENBSD_4_2
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)
use a more traditional while() instead of for() for getopt(). sync usage() to the man page. format string fixes. complain about failed calloc()'s instead of exiting silently. ok pry@,reyk@
Revision 1.37 / (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.36: +19 -7 lines
Diff to previous 1.36 (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.36 / (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.35: +17 -16 lines
Diff to previous 1.35 (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.35 / (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.34: +67 -5 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Thu May 31 03:24:05 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.33: +54 -23 lines
Diff to previous 1.33 (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.33 / (download) - annotate - [select for diffs], Wed May 30 00:51:21 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)
give ibuf to event_set
Revision 1.32 / (download) - annotate - [select for diffs], Wed May 30 00:19:25 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.31: +1 -41 lines
Diff to previous 1.31 (colored)
backout more code that shouldn't have gone in.
Revision 1.31 / (download) - annotate - [select for diffs], Wed May 30 00:12:21 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.30: +42 -4 lines
Diff to previous 1.30 (colored)
backout last diff which introduces problems and use the global environment instead.
Revision 1.30 / (download) - annotate - [select for diffs], Tue May 29 23:58:30 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.29: +7 -5 lines
Diff to previous 1.29 (colored)
make sure every dispatch function is fed the environment structure.
Revision 1.29 / (download) - annotate - [select for diffs], Tue May 29 23:19:18 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.28: +11 -5 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Tue May 29 18:59:53 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.27: +9 -5 lines
Diff to previous 1.27 (colored)
do not start relay processes when no L7 load balancing is needed. ok reyk@
Revision 1.27 / (download) - annotate - [select for diffs], Tue May 29 17:12:04 2007 UTC (17 years ago) by reyk
Branch: MAIN
Changes since 1.26: +18 -3 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Tue May 29 00:58:06 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.25: +6 -1 lines
Diff to previous 1.25 (colored)
when purging relays, purge sessions as well. not needed for the initial purge since no sessions exist but will be necessary when reloading the relay process.
Revision 1.25 / (download) - annotate - [select for diffs], Tue May 29 00:21:10 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)
move struct relay to the runtime + config scheme. this time around, include hoststatectl changes too.
Revision 1.24 / (download) - annotate - [select for diffs], Mon May 28 22:11:33 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.23: +81 -1 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Sun May 27 20:53:10 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Sat May 26 19:58:49 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.21: +61 -39 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Sat Mar 17 22:54:49 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.20: +2 -4 lines
Diff to previous 1.20 (colored)
remove a debug message
Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 26 16:10:24 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE,
OPENBSD_4_1
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)
handle strlcpy return values, make lint happy
Revision 1.19 / (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.18: +4 -4 lines
Diff to previous 1.18 (colored)
knf
Revision 1.18 / (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.17: +11 -7 lines
Diff to previous 1.17 (colored)
spacing
Revision 1.17 / (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.16: +178 -12 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Thu Feb 8 13:32:24 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.15: +5 -3 lines
Diff to previous 1.15 (colored)
carefully check some return values and make lint happier. never pass any truncated strings (table names/anchors/tags/...) to pf and the kernel. ok pyr@
Revision 1.15 / (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.14: +7 -2 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Tue Feb 6 10:03:08 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)
change fatal message to know where it happened
Revision 1.13 / (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.12: +3 -1 lines
Diff to previous 1.12 (colored)
Add SSL support to hoststated. with help and OK reyk@ with help and advice by claudio@ and Srebrenko Sehic
Revision 1.12 / (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.11: +2 -1 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Thu Jan 11 18:28:28 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)
spacing
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: +22 -1 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: +13 -13 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 02:32:58 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)
unbreak
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 13:37:26 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Mon Dec 25 18:40:38 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)
knf
Revision 1.4 / (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.3: +36 -1 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Sat Dec 16 14:07:29 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)
knf (second level indents are four spaces)
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: +63 -64 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@