summaryrefslogtreecommitdiffstats
path: root/usr.sbin/relayctl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make help output of relayctl redirect|host|table friendlier.reyk2018-05-111-4/+1
| | | | | | From Kapetanakis Giannis OK benno@
* add options to specify the control socket in relayd and relayctl.benno2017-11-292-7/+38
| | | | | From Kapetanakis Giannis, thanks. ok claudio@
* Replace [RELAY|SERVER]_MAXPROC with the new PROC_MAX_INSTANCESreyk2016-09-031-4/+4
| | | | | | | variable and limit it from 128 to 32 instances (the old value). While here, move a few PROC_ defines around. OK rzalamena@
* EAGAIN handling for imsg_read. OK henning@ benno@claudio2015-12-051-2/+2
|
* add missing "log" bitsgsoares2015-11-281-2/+6
| | | | | | spotted out by Luiz Gustavo Costa < luizgustavo at mundounix.com.br >, Thanks! OK jmc@ jsg@
* Move local logging functions from log.c to new file util.c (that isreyk2015-11-211-2/+2
| | | | | | | 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.
* two leftovers string missed in tame->pledge conversionsemarie2015-10-121-2/+2
| | | | ok jsg@
* relayctl pledges to use stdio onlybenno2015-10-101-1/+4
| | | | ok reyk@ sure deraadt@
* an TLS -> a TLS; from thanos tsouanasjmc2015-07-241-3/+3
|
* Use "compliant" header guards by avoiding the reserved '_' namespace.reyk2015-06-111-1/+6
| | | | | | Pointed out by Markus Elfring OK mikeb@ millert@
* Turn off -Werror in relayctl.reyk2015-06-031-2/+2
|
* Clean up the relayd headers with help of include-what-you-use and somereyk2015-01-223-24/+10
| | | | | | | manual review. Based on common practice, relayd.h now includes the necessary headers for itself. OK benno@
* spacingreyk2015-01-221-8/+11
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Change the keyword "ssl" to "tls" to reflect reality since wereyk2014-12-121-11/+11
| | | | | | | | | | | | 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@
* Replace the protocol directives for HTTP with a new generic filteringreyk2014-07-091-4/+5
| | | | | | | | | | | | | language. The grammar is inspired by pf and allows to write versatile last-matching filter rules in protocol sections starting with the "pass", "block" or "match" keywords. This work was started almost two years ago and replaces large parts of relayd(8)'s HTTP and filtering code. The initial version reimplements and extends HTTP filtering, but will be improved to support generic TCP and other protocols later. With some testing, feedback, and help from benno@ and andre@. OK benno@
* I did enough significant changes and/or additions since 2007 afterreyk2014-06-252-3/+5
| | | | | pyr@'s initial version to rightfully add my copyright to these files: sync with reality.
* in section 8, use DIAGNOSTICS rather than ERRORS,schwarze2014-02-121-5/+5
| | | | | and add a missing .Pa macro; from Jan Stary <hans at stare dot cz>
* Remove -Wbounded: it is now the compiler default.martynas2014-01-181-2/+2
|
* cope with the EAGAIN API change for msgbuf_write()deraadt2013-11-141-2/+2
| | | | ok benno
* time_t 64bit fixes for relayd and relayctl:benno2013-04-271-3/+3
| | | | | | | | | | | - fix statistics - set INT_MAX limit on session timeouts - make sure we dont use to large session timeouts in pf redirects and openssl tested with old and new time_t ok florian@
* Handle big time_tguenther2013-04-031-2/+2
| | | | ok deraadt@
* This diff changes relayd to use the monotonic clock instead ofreyk2013-03-101-3/+2
| | | | | | | | | | | | 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@
* Define empty CDIAGFLAGS for programs that use Werror.haesbaert2012-09-121-1/+2
| | | | | | Makes "make build" build with WARNINGS=Yes on amd64. ok espie
* Concurrent calls of "relayctl show sessions" could crash relayd. Fixreyk2011-05-201-2/+3
| | | | | | | the show sessions handler by implementing it in an asynchronous way. Closes PR 6509 ok pyr@
* Fix reload support in relayd(8) by reimplementing large parts of thereyk2011-05-194-7/+36
| | | | | | | | | | | | | | | daemon infrastructure. The previous design made it fairly hard to reload the complex data structures, especially relays and protocols. One of the reasons was that the privsep'd relayd processes had two ways of getting their configuration: 1) from memory after forking from the parent process and 2) and (partially) via imsgs after reload. The new implementation first forks the privsep'd children before the parents loads the configuration and sends it via imsgs to them; so it is only like 2) before. It is based on an approach that I first implemented for iked(8) and I also fixed many bugs in the code. Thanks to many testers including dlg@ sthen@ phessler@ ok pyr@ dlg@ sthen@
* Reorganize the relayd code to use the proc.c privsep API/commodityreyk2011-05-091-2/+2
| | | | | | | | | | | | functions that are based on work for iked and smtpd. This simplifies the setup of privsep processes and moves some redundant and repeated code to a single place - which is always good from a quality and security point of view. The relayd version of proc.c is different to the current version in iked because it uses 1:N communications between processes, eg. a single parent process is talking to many forked relay children while iked only needs 1:1 communications. ok sthen@ pyr@
* Add missing #includes instead of assuming that some system header pulls inguenther2010-12-311-1/+2
| | | | | | the needed bits ok deraadt@, millert@
* move some things around to make intentions clear. not really a functionaltedu2010-09-042-19/+21
| | | | change. ok claudio
* Move imsg into libutil and add a man page.nicm2010-05-261-2/+4
| | | | | | | | Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
* add "log brief" and "log verbose" to change logging verbosityjsg2010-01-113-5/+26
| | | | | | like several other things in the tree. ok reyk@ looks fine claudio@
* Don't use [] in function arguments when dealing with arraysjsg2009-11-132-6/+6
| | | | | | we don't know the size of, otherwise gcc >= 4 will error. ok markus@ deraadt@
* write UNIX-domain in a more consistent way; while here, replace asobrado2009-10-221-3/+3
| | | | | | | | few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
* use the UNIX-related macros (.At and .Ux) where appropriate.sobrado2009-10-221-3/+4
| | | | ok jmc@
* If relayd returned an error don't exit with success. This may help scriptsclaudio2009-09-011-2/+4
| | | | | to recognize when something did not work in a much easier way then parsing the relayctl output. OK reyk@
* also report routers and their host states in relayctlreyk2009-08-174-10/+41
| | | | ok pyr@, jmc@ for man bits
* rename 'struct session' to 'struct rsession' because it conflicts withreyk2009-08-071-2/+2
| | | | another 'struct session' in sys/sysctl.h.
* 4 handed diff with eric:pyr2009-06-051-9/+2
| | | | | | | | | | | | | Stop pushing event handling in the imsg framework. Instead, provide a small glue layer on top of both imsg and libevent. This finally clearly separates event handling and imsg construction. Sidetrack bonus: remove the mega-ugly hack of having a dummy imsg_event_add stub in relayctl. This will make bgpd (and thus henning) happy. Next up are smtpd and ospfd. ok eric@
* an ellipsis allows more than one argument being specified;sobrado2008-12-312-5/+5
| | | | sync synopsis/usage.
* change the way relayd reports check results: instead of logging anreyk2008-12-052-4/+102
| | | | | | | | | | | | | | | | 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@
* print the host parent id if availablereyk2008-07-191-2/+8
|
* add prefixes to names of structure elements to make it easier to grepthib2008-01-311-11/+11
| | | | | | for code, next struct session; ok reyk@;
* add prefixes to names of structure elements to make it easier to grepreyk2008-01-311-3/+3
| | | | | | for code, next struct relay. knf long line fixes will follow later. ok thib@
* note that redirections with the sticky-address option will not countreyk2007-12-201-1/+5
| | | | statistics for new connections with sticky states.
* implement statistics for redirections, like the existing statisticsreyk2007-12-204-34/+57
| | | | | | | | | 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@
* various improvements for the relay pages; ok reykjmc2007-12-121-9/+10
|
* Rename everything which reffered to services refer to rdr for internalspyr2007-12-083-31/+31
| | | | | | (for instance: rename struct service to struct rdr), refer to redirects otherwise (hoststatectl output). ok reyk@
* service -> redirectreyk2007-12-083-28/+28
| | | | ok pyr@
* some changes to the relayd.conf configuration language and grammar.reyk2007-12-081-3/+9
| | | | | | | | | | | | the tables will look more like pf tables, it is easier to re-use tables with different options, "services" will become "redirections" (they refer to rdr pf rules), sync configuration directives of redirect (l3, ex-service) relay (l7) sections (for example "virtual host" will become "listen on"), all target definitions will start with "forward to", etc. pp. (see relay.conf(5) and etc/relayd.conf) discussed with pyr and deraadt ok pyr@
* adjust the manpages to use "Relay daemon"reyk2007-12-071-2/+2
|