OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.44, Fri Dec 7 17:27:07 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.43: +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.43 / (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.42: +3 -3 lines
Diff to previous 1.42 (colored)

sort includes, adjust to style(9)

Revision 1.42 / (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.41: +4 -4 lines
Diff to previous 1.41 (colored)

spacing

Revision 1.41 / (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.40: +7 -2 lines
Diff to previous 1.40 (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.40 / (download) - annotate - [select for diffs], Wed Nov 14 15:25:26 2007 UTC (16 years, 6 months ago) by pyr
Branch: MAIN
Changes since 1.39: +7 -2 lines
Diff to previous 1.39 (colored)

do go through relays when none exist.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 30 21:04:45 2007 UTC (16 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.38: +8 -10 lines
Diff to previous 1.38 (colored)

untangle a mess in the state update logic

Revision 1.38 / (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.37: +2 -2 lines
Diff to previous 1.37 (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.37 / (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.36: +2 -2 lines
Diff to previous 1.36 (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.36 / (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.35: +2 -2 lines
Diff to previous 1.35 (colored)

Correct my mail address.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Sep 27 07:32:50 2007 UTC (16 years, 8 months ago) by pyr
Branch: MAIN
Changes since 1.34: +9 -4 lines
Diff to previous 1.34 (colored)

Do not clear the changed flag to early, which prevented a table
from being used by several services.
``looks fine'' reyk@

Revision 1.34 / (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.33: +53 -1 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (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.32: +2 -7 lines
Diff to previous 1.32 (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.32 / (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.31: +19 -7 lines
Diff to previous 1.31 (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.31 / (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.30: +21 -20 lines
Diff to previous 1.30 (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.30 / (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.29: +78 -1 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Thu May 31 18:24:02 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.28: +4 -7 lines
Diff to previous 1.28 (colored)

simplify pfe_disable_events

Revision 1.28 / (download) - annotate - [select for diffs], Thu May 31 15:49:26 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.27: +47 -16 lines
Diff to previous 1.27 (colored)

split pfe's event registration in separate functions (like for hce)

Revision 1.27 / (download) - annotate - [select for diffs], Thu May 31 03:24:05 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Tue May 29 23:42:15 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

when the time comes, let pfe_dispatch_parent be able to service more
than one message.

Revision 1.25 / (download) - annotate - [select for diffs], Tue May 29 23:19:18 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (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.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: +2 -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: +80 -75 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: +6 -5 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], Wed May 9 13:05:42 2007 UTC (17 years ago) by pyr
Branch: MAIN
Changes since 1.20: +7 -7 lines
Diff to previous 1.20 (colored)

fix potential NULL deref.
spotted by Ching-Feng Wang <cfw at telepaq.com>.
ok reyk@

Revision 1.20 / (download) - annotate - [select for diffs], Sat Mar 17 22:46:41 2007 UTC (17 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.19: +10 -5 lines
Diff to previous 1.19 (colored)

fix a bug in the initial setup of the pfe2relay communication sockets
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.

Revision 1.19 / (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.18: +22 -2 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Mon Feb 26 16:10:24 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

handle strlcpy return values, make lint happy

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

knf

Revision 1.16 / (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.15: +7 -6 lines
Diff to previous 1.15 (colored)

spacing

Revision 1.15 / (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.14: +149 -10 lines
Diff to previous 1.14 (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.14 / (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.13: +4 -2 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Tue Feb 6 11:21:35 2007 UTC (17 years, 3 months ago) by pyr
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

fix a bug when enabling a service that has no backup table.
ok reyk@

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

remove an unused variable.
ok reyk@

Revision 1.11 / (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.10: +22 -2 lines
Diff to previous 1.10 (colored)

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

Revision 1.10 / (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.9: +8 -1 lines
Diff to previous 1.9 (colored)

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

Revision 1.9 / (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.8: +3 -1 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (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.7: +2 -1 lines
Diff to previous 1.7 (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.7 / (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.6: +5 -5 lines
Diff to previous 1.6 (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.6 / (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.5: +2 -2 lines
Diff to previous 1.5 (colored)

adapt to rename

Revision 1.5 / (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.4: +1 -2 lines
Diff to previous 1.4 (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.4 / (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.3: +2 -1 lines
Diff to previous 1.3 (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.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: +53 -23 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: +47 -47 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.