Up to [local] / src / usr.sbin / relayd
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.35 / (download) - annotate - [select for diffs], Tue Mar 21 12:06:56 2017 UTC (7 years, 2 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2,
OPENBSD_6_1_BASE,
OPENBSD_6_1,
HEAD
Changes since 1.34: +6 -6 lines
Diff to previous 1.34 (colored)
From a syslog perspective it does not make sense to log fatal and warn with the same severity. Switch log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@ florian@
Revision 1.34 / (download) - annotate - [select for diffs], Mon Jan 9 14:49:21 2017 UTC (7 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.33: +12 -5 lines
Diff to previous 1.33 (colored)
Stop accessing verbose and debug variables from log.c directly. This replaces log_verbose() and "extern int verbose" with the two functions log_setverbose() and log_getverbose(). Pointed out by benno@ OK krw@ eric@ gilles@ (OK gilles@ for the snmpd bits as well)
Revision 1.33 / (download) - annotate - [select for diffs], Sun Jan 8 20:31:03 2017 UTC (7 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.32: +11 -9 lines
Diff to previous 1.32 (colored)
Sync log.c with the latest version from vmd/log.c that preserves errno so it is safe calling log_* after an error without loosing the it.
Revision 1.32 / (download) - annotate - [select for diffs], Wed Oct 12 11:57:31 2016 UTC (7 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.31: +11 -8 lines
Diff to previous 1.31 (colored)
copy updated log.c from vmd: for correctness, save errno when doing additional actions before printing it. OK rzalamena@
Revision 1.31 / (download) - annotate - [select for diffs], Mon Dec 7 12:13:51 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)
sync with vmd
Revision 1.30 / (download) - annotate - [select for diffs], Sun Nov 22 13:27:13 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.29: +52 -19 lines
Diff to previous 1.29 (colored)
Update log.c: change fatal() and fatalx() into variadic functions, include the process name, and replace all calls of fatal*(NULL) with fatal(__func__) for better debugging. OK benno@
Revision 1.29 / (download) - annotate - [select for diffs], Sat Nov 21 13:46:29 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.28: +4 -4 lines
Diff to previous 1.28 (colored)
Once again, fix the license text. After many years, we just cannot get rid of the "LOSS OF MIND" joke. Haha. We keep on removing it and it shows up again because it accidentally gets synced from somewhere else. bgpd and ospfd don't have it anymore, but their offsprings still carry it. If you see it, remove it, and, in the OpenBSD ISC case, use the original text from /usr/share/misc/license.template. All authors agree.
Revision 1.28 / (download) - annotate - [select for diffs], Sat Nov 21 12:37:42 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.27: +18 -248 lines
Diff to previous 1.27 (colored)
Move local logging functions from log.c to new file util.c (that is also shared with relayctl). This allows us to unify common log.c with other daemons. It also clarifies the Copyright: log.c is by Henning, relayd's additions were from me. No functional or code changes, but it will make future updates easier.
Revision 1.27 / (download) - annotate - [select for diffs], Thu Jan 22 17:42:09 2015 UTC (9 years, 4 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.26: +3 -10 lines
Diff to previous 1.26 (colored)
Clean up the relayd headers with help of include-what-you-use and some manual review. Based on common practice, relayd.h now includes the necessary headers for itself. OK benno@
Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 21 00:54:49 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)
Stop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary. *Do* pull it in when in_{port,addr}_h is needed and <netinet/in.h> isn't. ok reyk@
Revision 1.25 / (download) - annotate - [select for diffs], Fri Dec 12 10:05:09 2014 UTC (9 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.24: +17 -17 lines
Diff to previous 1.24 (colored)
Change the keyword "ssl" to "tls" to reflect reality since we effectively disabled support for the SSL protocols. SSL remains a common term describing SSL/TLS, there is some controvery about this change, and the name really doesn't matter, but I feel confident about it now. (btw., sthen@ pointed out some historical context: http://tim.dierks.org/2014/05/security-standards-and-name-changes-in.html) OK benno@, with input from tedu@
Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 25 03:23:49 2014 UTC (9 years, 7 months ago) by lteo
Branch: MAIN
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored)
Remove unnecessary netinet/in_systm.h include. ok millert@
Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 12 14:34:13 2014 UTC (9 years, 10 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.22: +1 -57 lines
Diff to previous 1.22 (colored)
Move HTTP error codes into http.h. ok benno@
Revision 1.22 / (download) - annotate - [select for diffs], Fri Apr 18 16:13:02 2014 UTC (10 years, 1 month ago) by reyk
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)
fix previous
Revision 1.21 / (download) - annotate - [select for diffs], Fri Apr 18 16:09:07 2014 UTC (10 years, 1 month ago) by reyk
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)
spacing
Revision 1.20 / (download) - annotate - [select for diffs], Wed Nov 27 18:38:39 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)
unsigned char for ctype
Revision 1.19 / (download) - annotate - [select for diffs], Sun Mar 10 23:32:53 2013 UTC (11 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.18: +12 -1 lines
Diff to previous 1.18 (colored)
This diff changes relayd to use the monotonic clock instead of gettimeofday(). It was also bugging me for some time to have all these checks of gettimeofday()'s return value: it should not fail. So this diff introduces a void getmonotime(struct timeval *tv) that calls clock_gettime(CLOCK_MONOTONIC, &ts) and converts the output to a struct timeval that can be used with the existing code and the timeval-specific timer functions (timerclear, timersub, ...). It does not return a status but calls fatal() on error-that-should-not-happen. ok sthen@ chris@
Revision 1.18 / (download) - annotate - [select for diffs], Tue Nov 27 05:00:28 2012 UTC (11 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.17: +5 -3 lines
Diff to previous 1.17 (colored)
Add format attributes to the proper functions and then fix the warnings that gcc then reports when compiling with -DDEBUG=2 ok reyk@ benno@
Revision 1.17 / (download) - annotate - [select for diffs], Tue Apr 12 12:37:22 2011 UTC (13 years, 2 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1,
OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.16: +37 -1 lines
Diff to previous 1.16 (colored)
update flags and printing of flags in debug mode, handle splicing flag.
Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 30 14:38:45 2010 UTC (13 years, 6 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.15: +9 -3 lines
Diff to previous 1.15 (colored)
The relayd processes did already bump up the socket file descriptor resource limits to the maximum of the daemon class but the host check process (hce/health checks) didn't and was limited to a fairly low default of 128 open sockets (openfiles-cur=128 in login.conf). This was reached fairly quickly with "check tcp" of many hosts. This diff increases the maximum number of monitored hosts and concurrent health checks in relayd in a significant way and may fix issues for people that have around 100 or more hosts (or fewer hosts with multiple checked ports). tested by phessler@ ok jsg@
Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 11 06:40:14 2010 UTC (14 years, 5 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8,
OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.14: +10 -2 lines
Diff to previous 1.14 (colored)
add "log brief" and "log verbose" to change logging verbosity like several other things in the tree. ok reyk@ looks fine claudio@
Revision 1.14 / (download) - annotate - [select for diffs], Fri Dec 5 16:37:55 2008 UTC (15 years, 6 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6,
OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.13: +106 -1 lines
Diff to previous 1.13 (colored)
change the way relayd reports check results: instead of logging an arbitrary string in debugging mode, it will store an error code (HCE_*) for each host. the error code can be translated to a string (in log.c) for debugging but it will also be passed to relayctl via the control socket. from a user point of view, this will print a human-readable error message in the "relayctl show hosts" output if a host is down because the check failed. the relayctl(8) manpage includes detailed explanations of the error messages including mitigations for the most-common problems. ok jmc@ (manpages) ok phessler@
Revision 1.13 / (download) - annotate - [select for diffs], Fri Jul 18 12:26:52 2008 UTC (15 years, 10 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE,
OPENBSD_4_4
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)
terminate the input buffer on failure in print_host()
Revision 1.12 / (download) - annotate - [select for diffs], Thu Jul 17 15:10:14 2008 UTC (15 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.11: +6 -10 lines
Diff to previous 1.11 (colored)
use getaddrinfo/getnameinfo to parse ipv6 addresses instead of inet_pton/inet_ntop to allow specifing and printing the IPv6 scope identifier. synced host_v6() with ntpd's version to use getaddrinfo() instead of inet_pton() - host_v4, host_v6, and host_dns could all use getaddrinfo in a single function by specifing different flags but this would diverge from the other daemons using this common interface so we keep this little overhead. discussed with henning@ ok pyr@
Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 7 17:17:00 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE,
OPENBSD_4_3
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)
hoststated gets renamed to relayd. easier to type, and actually says 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
Revision 1.10 / (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.9: +2 -4 lines
Diff to previous 1.9 (colored)
sort includes, adjust to style(9)
Revision 1.9 / (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.8: +57 -1 lines
Diff to previous 1.8 (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.8 / (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.7: +2 -2 lines
Diff to previous 1.7 (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.7 / (download) - annotate - [select for diffs], Fri Sep 7 07:52:14 2007 UTC (16 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.6: +17 -1 lines
Diff to previous 1.6 (colored)
add a function to print delays in hours, minutes, and seconds
Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 6 19:55:45 2007 UTC (16 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.5: +17 -1 lines
Diff to previous 1.5 (colored)
rename relay_host to print_host in log.c
Revision 1.5 / (download) - annotate - [select for diffs], Tue May 29 17:12:04 2007 UTC (17 years ago) by reyk
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (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.4 / (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.3: +14 -1 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Wed Feb 7 15:17:46 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.2: +52 -10 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Sat Dec 16 17:48:27 2006 UTC (17 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +9 -9 lines
Diff to previous 1.1 (colored)
spacing
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@