summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hoststated/pfe.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hoststated/hoststatectl get repository copied (and de-tagged) intoderaadt2007-12-071-910/+0
| | | | | | | 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"
* sort includes, adjust to style(9)reyk2007-11-241-3/+3
|
* spacingreyk2007-11-191-4/+4
|
* Do not insert proto_default inside the dynamically alloced protocol queue.pyr2007-11-151-2/+7
| | | | | Handle it as a special case in the one place where it actually matters instead.
* do go through relays when none exist.pyr2007-11-141-2/+7
|
* untangle a mess in the state update logicreyk2007-10-301-10/+8
|
* Move relays from static TAILQs to allocated ones.pyr2007-10-191-2/+2
| | | | | This syncs it with other hoststated entities and will make reload easier. This is step 1 out of 7 for reload.
* Add the ability to schedule an immediate check through hoststatectl.pyr2007-10-191-2/+2
| | | | | Especially useful when interval is rather long. I was supposed to commit this before 4.2.
* Correct my mail address.pyr2007-09-281-2/+2
|
* Do not clear the changed flag to early, which prevented a tablepyr2007-09-271-4/+9
| | | | | from being used by several services. ``looks fine'' reyk@
* add an interface to dump running relay sessions to the control socketreyk2007-09-071-1/+53
|
* don't go through the effort of creating a SIGHUP handler throughpyr2007-06-191-7/+2
| | | | | libevent just to ignore it, use SIG_IGN instead. this syncs hoststated with bgpd and (soon) ospfd.
* Do not fatal out with ``pipe closed'' when a short read occurs on onepyr2007-06-191-7/+19
| | | | | | | | 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@
* put the fd passing from bgpd back in to hoststated's version of imsg,msf2007-06-121-20/+21
| | | | | | needed for layer 7 reload support. ok pyr@
* (finally) Enable reload support for layer 3 configurations.pyr2007-06-071-1/+78
| | | | | | Hoststated can be reloaded either by sending SIGHUP to the parent process or by using ``hoststatectl reload'' discussed and ok reyk@
* simplify pfe_disable_eventspyr2007-05-311-7/+4
|
* split pfe's event registration in separate functions (like for hce)pyr2007-05-311-16/+47
|
* allocate table lists and service lists instead of using static structs.pyr2007-05-311-4/+4
| | | | | split the code to start the event loop in two functions. introduce merge_config which will be used later on.
* when the time comes, let pfe_dispatch_parent be able to service morepyr2007-05-291-1/+2
| | | | than one message.
* allow the control handling code to send messages back to the parent.pyr2007-05-291-2/+2
| | | | forward IMSG_CTL_RELOAD which ends up not doing anything for now.
* another small step towards hoststated reloading.pyr2007-05-281-1/+2
| | | | | | | | 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@
* Second step towards hoststated reload:pyr2007-05-271-75/+80
| | | | | | | | | | 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@
* first steps for implementing reload:pyr2007-05-261-5/+6
| | | | | | | * 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@
* fix potential NULL deref.pyr2007-05-091-7/+7
| | | | | spotted by Ching-Feng Wang <cfw at telepaq.com>. ok reyk@
* fix a bug in the initial setup of the pfe2relay communication socketsreyk2007-03-171-5/+10
| | | | | | | | which prevented the pfe to accept statistics updates and natlookups from any other process then the first one. in other words, this will show you the total relay statistics off _all_ preforked processes (hoststatectl show relays) and it will unbreak the natlookup mode with more than one running relay process.
* - fix the hoststatectl host disable/enable commands to work with relayreyk2007-03-071-2/+22
| | | | | | | | 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@
* handle strlcpy return values, make lint happyreyk2007-02-261-2/+2
|
* knfderaadt2007-02-231-2/+2
|
* spacingreyk2007-02-221-6/+7
|
* Add layer 7 functionality to hoststated used for layer 7reyk2007-02-221-10/+149
| | | | | | | | | | 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@
* carefully check some return values and make lint happier. never passreyk2007-02-081-2/+4
| | | | | | | any truncated strings (table names/anchors/tags/...) to pf and the kernel. ok pyr@
* fix a bug when enabling a service that has no backup table.pyr2007-02-061-1/+3
| | | | ok reyk@
* remove an unused variable.pyr2007-02-061-3/+1
| | | | ok reyk@
* inform hoststatectl monitor of ruleset changes and table syncs.pyr2007-02-061-2/+22
| | | | ok reyk@
* add a monitor mode to hoststatectl to continuously report changes inpyr2007-02-011-1/+8
| | | | | hoststated. ok reyk@, "looks nice and clean" niallo@
* Add SSL support to hoststated.pyr2007-01-291-1/+3
| | | | | with help and OK reyk@ with help and advice by claudio@ and Srebrenko Sehic
* Similar to ospfd and ripd ignore SIGPIPE in all processes to be able to doclaudio2007-01-241-1/+2
| | | | a nice exit in case one of the processes dies. OK pyr@
* Finish renaming hostated to hoststated.pyr2007-01-091-5/+5
| | | | | | Note to testers: the user the daemon changes its id to is now _hoststated, don't forget to update master.passwd. ok reyk@
* adapt to renamederaadt2007-01-091-2/+2
|
* do NOT use the regexp interface. it is way to complicated, error-pronereyk2007-01-081-2/+1
| | | | | | | | | | | 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)
* add a generic send/expect check using regular expression (seereyk2007-01-081-1/+2
| | | | | | | regex(3)). this allows to define additional checks for other TCP protocols. From Pierre-Yves Ritschard (pyr at spootnik dot org)
* - allow to use host/service/table names instead of Ids in hostatectl.reyk2006-12-161-23/+53
| | | | | | | - 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
* knf, spacingreyk2006-12-161-47/+47
| | | | | | 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 ;).
* Import hostated, the host status daemon. This daemon will monitorreyk2006-12-161-0/+497
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@