summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2016-02-02Remove setproctitle() for the parent process. Because rc.d(8) uses processStuart Henderson
titles (including flags) to distinguish between daemons, this makes it possible to manage multiple copies of a daemon using the normal infrastructure by symlinking rc.d scripts to a new name. ok jung@ ajacoutot@, smtpd ok gilles@
2016-01-11This adds the host_error output and the http code (when available) to theSebastian Benoit
host-check log. ok claudio@
2015-12-30SSL_CTX_free() and SSL_free() check for null so dont do it in relaydSebastian Benoit
ok jung@ tedu@ deraadt@
2015-12-30now that ibuf_free() checks for null, we can remove the check here.Sebastian Benoit
ok mmcc@ millert@
2015-12-24revert check_tcp rev 1.41 by yasuoka@Sebastian Benoit
This part was not meant to be commited, only the bits in check_icmp.c and relayd.h are ok. ok yasuoka@
2015-12-24completly -> completelymmcc
2015-12-15PATCH is like PUT, data is expected.Reyk Floeter
From mxb at alumni chalmers se
2015-12-07Add imsg "peerid" to debug messages (only within -DDEBUG).Reyk Floeter
2015-12-07sync with vmdReyk Floeter
2015-12-07Remove NULL-checks before free(). No functional change.mmcc
2015-12-05initialize host, to get rid of gcc warning, the conditions are correct.Sebastian Benoit
ok henning@
2015-12-05EAGAIN handling for imsg_read. OK henning@ benno@Claudio Jeker
2015-12-05don't attempt to process AgentX packets when a short read is encounteredBret Lambert
while here, remove a pair of duplicate function definitions ok benno@
2015-12-04pledge the relay (layer 7 proxy) children, they can do with "stdioSebastian Benoit
recvfd inet" ok reyk@
2015-12-03quick removal of all host-related entries in the related relayd anchorSebastian Benoit
if the host fails the SLA check. patch from Brian S. Vangsgaard. ok reyk@
2015-12-02relayd (when running relays) can distribute client sessions over hostsSebastian Benoit
with a hash generated from different data and calculate modulo rlt->rlt_nhosts to find the host the session should go to. If this host is down, the current algorithm simply selects the next host that is up, obviously not ideal, because this puts heavier load on this next host. this changes the algorithm: if the chosen host is not available, the hash value is recalculated and and retried until a host that is usable is found or a maximum of retires is reached (in that case the old method is used). ok and nice input on my original idea bluhm@
2015-12-02In most cases we don't need all arguments of proc_compose*_imsg(),Reyk Floeter
so add a shortcut proc_compose*() that skips all of them. Only use the full argument list if needed. The functions with full argument lists can eventually be replaced with a nicer transaction-based approach later. OK benno@
2015-11-29Use pledge("pf") in pfe.c.Sebastian Benoit
Move getrtable() from pfe to parent process, since its in the way of pledge. ok deraadt@, feedback from reyk@ on previous version.
2015-11-28pledge: allow getsockopt IP_IPDEFTTL with promise inetSebastian Benoit
then relayd's host check engine can be pledged. ok reyk@, approach suggested by deraadt@ weeks ago.
2015-11-28Use SOCK_NONBLOCK in relayd as well.Reyk Floeter
OK benno@
2015-11-23Sync proc.c with iked: the default proc_dispatch_null allows to removeReyk Floeter
some empty imsg callback stubs in the privsep processes. iked's proc.c -r1.24 was OK benno@ deraadt@
2015-11-22Update log.c: change fatal() and fatalx() into variadic functions,Reyk Floeter
include the process name, and replace all calls of fatal*(NULL) with fatal(__func__) for better debugging. OK benno@
2015-11-21Once again, fix the license text. After many years, we just cannotReyk Floeter
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.
2015-11-21Move local logging functions from log.c to new file util.c (that isReyk Floeter
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.
2015-11-19Simplify all instances of get_string() and get_data() using malloc() andmmcc
strndup(). ok millert@
2015-11-06relayd.conf(5) macro cleanup.Anthony J. Bentley
- use <> instead of \*(Lt and \*(Gt - use <> instead of Aq (Aq is not the same as <> in a UTF-8 locale) - replace Ar usage when appropriate - mark up RTP_STATIC with Dv with input from jmc@ schwarze@, ok schwarze@
2015-10-27change cipher-server-preference to be on by default. It can be disabled withSebastian Benoit
no cipher-server-preference this makes more clients select ciphers with pfs. requested and ok by reyk@
2015-10-24clarify where "with tls" can be used.Sebastian Benoit
ok jmc@
2015-10-23let the icmp check use getsockopt IP_IPDEFTTL to get the default ttlSebastian Benoit
instead of using sysctl. makes it possible to pledge hce.
2015-10-14More (unsigned char) casts for ctype functions.Reyk Floeter
Pointed out by Michael McConville
2015-10-10relayd's ca process pledges to only use stdio.Sebastian Benoit
ok deraadt@
2015-10-01sync proc.c with httpd. no functional change, only switching to C99 types.Reyk Floeter
2015-09-27include <unistd.h> unconditionallyTheo de Raadt
ok benno
2015-08-21Increase the input side socket buffer size for "check icmp" not toYASUOKA Masahiko
drop the reply messages when "check icmp" is used with many hosts. ok reyk benno
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
ok millert krw
2015-08-10typo, decl*e*ration; from Larry HynesStuart Henderson
2015-07-29fix bug where other than the last of multiple forward rules in httpSebastian Benoit
protocols would be ignored, reported and fixed by J. Fischer (lists -AT- mistrust -DOT- net) and reminded by (trondd -AT- kagu-tsuchi -DOT- com), thanks! ok deraadt@
2015-07-28spacingReyk Floeter
2015-07-27use file system path (.Pa) semantic markup macros where appropriate.Igor Sobrado
ok jmc@
2015-07-24an TLS -> a TLS; from thanos tsouanasJason McIntyre
2015-07-19don't return failure for agentx messages with 0-length payloadsBret Lambert
allows snmpd to properly handle ping messages from agentx subagents ok reyk@
2015-07-18Fix unbounded buffer growth. In the case of a slow client reading large files,Sebastian Benoit
we would consume large ammounts of memory. Found by Matthew Martin <matt DOT a DOT martin AT gmail DOT com> in httpd, fixed in httpd by florian@ feedback from florian, reyk and bluhm, ok bluhm, reyk
2015-06-12To match relayd's style, use an explicit enum with prefixed names forReyk Floeter
the states that Claudio introduced. No functional change. OK claudio@ benno@
2015-06-11Use "compliant" header guards by avoiding the reserved '_' namespace.Reyk Floeter
Pointed out by Markus Elfring OK mikeb@ millert@
2015-06-08Introduce a state on the ctl_relay_event struct. This makes it possibleClaudio Jeker
to better track the connection state of a session and stops doing double opens in certain situations using http relays. Using a state field to simplify the logic since relay_connect() is called multiple times. OK benno@, bluhm@ and running in production for more than a week
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-06-01Fix memory leak in error case. OK bluhm@ benno@Claudio Jeker
2015-05-30Plug a memory leak by simplifying kv_free(). By checking the type andClaudio Jeker
returning early the key and value memory got leaked on HTTP header kvs since their type was never set. OK benno@
2015-05-30Remove fields from struct that are not used. OK benno@Claudio Jeker
2015-05-28Do not try to unlink the control socket in an unprivileged childFlorian Obser
process on shutdown. Found while working on tame(2). OK benno@