summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/pfe.c
AgeCommit message (Collapse)Author
2008-08-08Check gettimeofday() against -1; Add a missing error check in one place.Thordur I. Bjornsson
OK reyk@
2008-07-19no need for using a TAILQ queue for the host children list, use aReyk Floeter
singly-linked SLIST instead. the only noticeable change is the reversed order to notify the children but it does not really matter here. also only walk through the children host list if the host itself is a potential parent.
2008-07-19If the new 'parent' keyword is specified for a host in a table,Reyk Floeter
inherit the state from another host with the specified Id; no additional check will be for the inheriting host. This helps in scenarios with lots of IP aliases that all point to the same service on the same host (like web hosting with many SSL domains). discussed with pyr, tested in different setups
2008-01-31add prefixes to names of structure elements to make it easier to grepReyk Floeter
for code, next struct relay. knf long line fixes will follow later. ok thib@
2008-01-31add prefixes to names of structure elements to make it easier to grepReyk Floeter
for code, start with struct relayd. finally. ok thib@
2007-12-20implement statistics for redirections, like the existing statisticsReyk Floeter
for relays. they can be viewed with the new "relayctl show redirects" command. (uses the previous change to pf_table.c to get the statistics) looks good pyr@
2007-12-08Rename everything which reffered to services refer to rdr for internalsPierre-Yves Ritschard
(for instance: rename struct service to struct rdr), refer to redirects otherwise (hoststatectl output). ok reyk@
2007-12-07hoststated gets renamed to relayd. easier to type, and actually saysReyk Floeter
what the daemon does - it is a relayer that pays attention to the status of pools of hosts; not a status checkers that happens to do some relaying
2007-11-24sort includes, adjust to style(9)Reyk Floeter
2007-11-19spacingReyk Floeter
2007-11-15Do not insert proto_default inside the dynamically alloced protocol queue.Pierre-Yves Ritschard
Handle it as a special case in the one place where it actually matters instead.
2007-11-14do go through relays when none exist.Pierre-Yves Ritschard
2007-10-30untangle a mess in the state update logicReyk Floeter
2007-10-19Move relays from static TAILQs to allocated ones.Pierre-Yves Ritschard
This syncs it with other hoststated entities and will make reload easier. This is step 1 out of 7 for reload.
2007-10-19Add the ability to schedule an immediate check through hoststatectl.Pierre-Yves Ritschard
Especially useful when interval is rather long. I was supposed to commit this before 4.2.
2007-09-28Correct my mail address.Pierre-Yves Ritschard
2007-09-27Do not clear the changed flag to early, which prevented a tablePierre-Yves Ritschard
from being used by several services. ``looks fine'' reyk@
2007-09-07add an interface to dump running relay sessions to the control socketReyk Floeter
2007-06-19don't go through the effort of creating a SIGHUP handler throughPierre-Yves Ritschard
libevent just to ignore it, use SIG_IGN instead. this syncs hoststated with bgpd and (soon) ospfd.
2007-06-19Do not fatal out with ``pipe closed'' when a short read occurs on onePierre-Yves Ritschard
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@
2007-06-12put the fd passing from bgpd back in to hoststated's version of imsg,Mathieu Sauve-Frankel
needed for layer 7 reload support. ok pyr@
2007-06-07(finally) Enable reload support for layer 3 configurations.Pierre-Yves Ritschard
Hoststated can be reloaded either by sending SIGHUP to the parent process or by using ``hoststatectl reload'' discussed and ok reyk@
2007-05-31simplify pfe_disable_eventsPierre-Yves Ritschard
2007-05-31split pfe's event registration in separate functions (like for hce)Pierre-Yves Ritschard
2007-05-31allocate table lists and service lists instead of using static structs.Pierre-Yves Ritschard
split the code to start the event loop in two functions. introduce merge_config which will be used later on.
2007-05-29when the time comes, let pfe_dispatch_parent be able to service morePierre-Yves Ritschard
than one message.
2007-05-29allow the control handling code to send messages back to the parent.Pierre-Yves Ritschard
forward IMSG_CTL_RELOAD which ends up not doing anything for now.
2007-05-28another small step towards hoststated reloading.Pierre-Yves Ritschard
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@
2007-05-27Second step towards hoststated reload:Pierre-Yves Ritschard
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@
2007-05-26first steps for implementing reload:Pierre-Yves Ritschard
* 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@
2007-05-09fix potential NULL deref.Pierre-Yves Ritschard
spotted by Ching-Feng Wang <cfw at telepaq.com>. ok reyk@
2007-03-17fix a bug in the initial setup of the pfe2relay communication socketsReyk Floeter
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.
2007-03-07- fix the hoststatectl host disable/enable commands to work with relayReyk Floeter
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@
2007-02-26handle strlcpy return values, make lint happyReyk Floeter
2007-02-23knfTheo de Raadt
2007-02-22spacingReyk Floeter
2007-02-22Add layer 7 functionality to hoststated used for layer 7Reyk Floeter
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@
2007-02-08carefully check some return values and make lint happier. never passReyk Floeter
any truncated strings (table names/anchors/tags/...) to pf and the kernel. ok pyr@
2007-02-06fix a bug when enabling a service that has no backup table.Pierre-Yves Ritschard
ok reyk@
2007-02-06remove an unused variable.Pierre-Yves Ritschard
ok reyk@
2007-02-06inform hoststatectl monitor of ruleset changes and table syncs.Pierre-Yves Ritschard
ok reyk@
2007-02-01add a monitor mode to hoststatectl to continuously report changes inPierre-Yves Ritschard
hoststated. ok reyk@, "looks nice and clean" niallo@
2007-01-29Add SSL support to hoststated.Pierre-Yves Ritschard
with help and OK reyk@ with help and advice by claudio@ and Srebrenko Sehic
2007-01-24Similar to ospfd and ripd ignore SIGPIPE in all processes to be able to doClaudio Jeker
a nice exit in case one of the processes dies. OK pyr@
2007-01-09Finish renaming hostated to hoststated.Pierre-Yves Ritschard
Note to testers: the user the daemon changes its id to is now _hoststated, don't forget to update master.passwd. ok reyk@
2007-01-09adapt to renameTheo de Raadt
2007-01-08do NOT use the regexp interface. it is way to complicated, error-proneReyk Floeter
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)
2007-01-08add a generic send/expect check using regular expression (seeReyk Floeter
regex(3)). this allows to define additional checks for other TCP protocols. From Pierre-Yves Ritschard (pyr at spootnik dot org)
2006-12-16- allow to use host/service/table names instead of Ids in hostatectl.Reyk Floeter
- 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
2006-12-16knf, spacingReyk Floeter
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 ;).