summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
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@
2015-05-22fix a non safe use of TAILQ_FOREACH with TAILQ_REMOVEJonathan Gray
ok reyk@
2015-05-18Fix a crash reported and analyzed by Bertrand PROVOST. When a HTTPAlexander Bluhm
client or server writes multiple requests or chunks in a single transfer, relayd invokes the libevent callback manually for the next data. If the callback closes the session, this resulted in an use after free. Instead of the more complicated fix suggested by Bertrand PROVOST, just move the invocation of the callback to the end of the function. So in case the callback frees any structures, they are not accessed. OK benno@ reyk@
2015-05-18The first line of a HTTP request is the method-url-version. TheAlexander Bluhm
second line is a key-value header. So you cannot append to the previous key-value before line three. Also reset the last header when all headers are purged to avoid a use after free. OK benno@ reyk@
2015-05-15Fix kill'n'yank error: the port is mandatory in relay listen on statements.Reyk Floeter
Pointed out by Alex Greif OK jmc@
2015-05-15client/server mox ip;Jason McIntyre
from trondd
2015-05-02Fix obvious problems with relayd config reload.Claudio Jeker
- fix a TAILQ corruption because of a use after free - do not reinit the SSL engine since that fails OK sthen, benno
2015-04-29When the HTTP client did close the connection while relayd was stillAlexander Bluhm
parsig the HTTP header, the session was never destroyed. This resulted in a file descriptor leak. Add a check wether the protocol knows how much data to expect. If relayd is reading unlimited data or is expecting nothing to read, ignore the end-of-file. Otherwise it is a protocol violation, so close the session immediately. While there, make relayd compile with DEBUG defined. Based on a diff from claudio@; tested by claudio@; OK claudio@ benno@
2015-04-23We cannot log errors with relay_close() before allocatingFlorian Obser
se_log evbuffer. (Same problem as the one just fixed in httpd(8)) OK benno
2015-04-21fix a memory leak. ok blambert@Jonathan Gray
2015-03-24Missing free(3) in error pathGiovanni Bechis
ok benno@
2015-03-09Make relayd TLSv1.2-only by default.Reyk Floeter
OK krw@ benno@ Based on revision 1.66 of usr.sbin/httpd/parse.y: Make httpd TLSv1.2-only by default. Some older browsers, like IE 10, will be incompatible with this change. We do this early in the release cycle, so there is a good chance to get more experience with the impact of it and the upcoming restricted cipher modes. OK jsing@ deraadt@ benno@ bmercer@ krw@ florian@
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-02-08move a log_warnx() to a DPRINTF, as it's information intendedBret Lambert
for developers, not sysadmins original diff from yasuoka@
2015-02-06Rename SSL_CTX_use_certificate_chain() to SSL_CTX_use_certificate_chain_mem().Reyk Floeter
As discussed with beck@ jsing@ and others OK beck@
2015-01-22Clean up the relayd headers with help of include-what-you-use and someReyk Floeter
manual review. Based on common practice, relayd.h now includes the necessary headers for itself. OK benno@
2015-01-22spacingReyk Floeter
2015-01-22wrap long lines; spacing.Reyk Floeter
Repeat after me: "Lines are not longer than 80 characters long" and "mg(1) is the only true editor, I'll use ESC-q to wrap the lines".
2015-01-22LibreSSL now supports loading of CA certificates from memory, replaceReyk Floeter
the internal and long-serving ssl_ctx_load_verify_memory() function with a call to the SSL_CTX_load_verify_mem() API function. The ssl_privsep.c file with hacks for using OpenSSL in privsep'ed processes can now go away; portable versions of smtpd and relayd should start depending on LibreSSL or they have to carry ssl_privsep.c in openbsd-compat to work with legacy OpenSSL. No functional change. Based on previous discussions with gilles@ bluhm@ and many others OK bluhm@ (as part of the libcrypto/libssl/libtls diff)
2015-01-21Include <netinet/in.h> before <net/pfvar.h>. In a future change whenTheo de Raadt
ports is ready, <net/pfvar.h> will stop including a pile of balony.
2015-01-16SSL_CTX_use_certificate_chain() has been added to LibreSSL and thereReyk Floeter
is no need to keep a local copy in ssl_privsep.c. This adds a little burden on OpenSMTPD-portable because it will have to put it in openbsd-compat for compatibility with legacy OpenSSL. OK gilles@
2015-01-16Adapt to <limits.h> universe.Theo de Raadt
ok millert
2015-01-16The SSL/TLS session Id context is limited to 32 bytes. Instead ofReyk Floeter
using the name of relayd relay or smtpd pki, use a 32 byte arc4random buffer that should be unique for the context. This fixes an issue in OpenSMTPD when a long pki name could break the configuration. OK gilles@ benno@
2015-01-13bump copyright yearReyk Floeter
2015-01-02PFS stands for Perfect Forward Secrecy.Igor Sobrado
ok reyk@
2015-01-01Merge error page changes from httpd: send Content-Length:, changeReyk Floeter
Date: from asctime to the preferred HTTP/1.1 format, and use the popular "Comic Sans" style (can be changed in the configuration).
2015-01-01Use the recommended HTML5 doctype in error pages.Reyk Floeter
OK validator.w3.org (This document was successfully checked as HTML5!)
2014-12-27zap trailing whitespace;Jason McIntyre
2014-12-26Document forward to in protocols.Sebastian Benoit
2014-12-23pf now supports source-hash and random with tables so we can allow itReyk Floeter
in redirections. Thanks for help and input from jsg and yasuoka who reminded me to dig out and update these old diffs for pf and relayd. ok jsg@