summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2009-04-02add support to specify a ca file (eg. /etc/ssl/cert.pem) to verify sslReyk Floeter
server certificates when connecting as an SSL client from relays. it works so far, but needs more testing and is currently lacking support for certificate revocation (like CRL or OCSP). the file ssl_privsep.c is extended to implement more code that should be in openssl to allow loading the ca from chroot...
2009-04-01fix an incorrect flag in route mode.Reyk Floeter
From Padcal Lalonde, closes PR 6114
2009-04-01re-initialize tables after reload to handle new and changed tables.Reyk Floeter
From Pascal Lalonde, closes PR 6112
2009-04-01Add support for client-side SSL connections from relays. relayd canReyk Floeter
now sit between two SSL connections (Oitm - OpenBSD-in-the-middle), accept SSL connections and forward to TCP, accept TCP connections and forward to SSL, and do TCP to TCP of course. This was tested by some people a while ago.
2009-04-01terminate and cleanup properly by setting the pf anchor namesReyk Floeter
correctly (anchor names with characters after the terminating NUL byte are considered invalid). Thanks to camield@
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2009-02-25Fix an invalid pointer dereference in control_close(). If control_connbyfd()Claudio Jeker
fails -- which should never happen -- the function does not return and is accession the NULL set control pointer later on. Found by Matthew Haub. OK deraadt@
2009-02-16relayd complains about a table called "backup", so change it toJason McIntyre
fallback, as used in /etc/relayd.conf; from Patrik Lundin
2008-12-08change the handling of redirections with the sticky-address option set:Reyk Floeter
instead of flushing the complete source tracking table (sticky addresses) in pf on host state changes, just flush the entries for hosts that have been marked as down in the relayd table. this fixes ugly problems with users loosing their sessions if another host or redirection was going down. ok cloder@
2008-12-05use HTTP/1.1 instead of HTTP/1.0 if a host header is specified.Reyk Floeter
spotted by phessler@
2008-12-05change the way relayd reports check results: instead of logging anReyk Floeter
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@
2008-12-04cosmetic changes:Reyk Floeter
- log table changes in sync_table() if "log updates" is enabled. before we only logged these changes in debug mode when running relayd in foreground. - type in a log message
2008-11-09typo fixed (overriden -> overridden)Tobias Stoeckmann
ok espie, jmc
2008-10-17bring in the findeol() fix from pfctl. list of affected parsers by sthenHenning Brauer
2008-10-05tweak previous;Jason McIntyre
2008-10-03Unify code between the various flavors of imsg buffer.c.Eric Faurot
Use unsigned int for msg_iovlen. ok henning@ claudio@
2008-09-29fix log option with filter rulesReyk Floeter
2008-09-29also log the label if available for the matching rule node (like theReyk Floeter
URL filter category etc.)
2008-09-29spacingReyk Floeter
2008-09-29Change parsing of comments in external rule files. The hash mark mayReyk Floeter
appear in URLs (eg. /index.html#anchor), so only allow full-line comments indicated by a hash mark # at the beginning of a line.
2008-09-29allow to load expect, filter, log, and remove keys from external filesReyk Floeter
just containing on key per line. this allows easier use of URL white/blacklists from external sources.
2008-09-29sort tokens for better readabilityReyk Floeter
2008-09-29allow to listen on a port range for redirections. this fixesReyk Floeter
stickyness with web applications that cannot do the clustering on their own and require stickyness with HTTP to HTTPS migration. this is required in many cases; it is a true fact that we cannot always fix the backend application in the real world. Tested and requested by many
2008-09-03Missing breaks.Jonathan Gray
ok pyr@
2008-08-11more goto fail on gettimeofday errorReyk Floeter
2008-08-11better handling of HTTP POSTs or requests with Content-Length.Reyk Floeter
2008-08-11add missing 'break' to read HTTP content correctlyReyk Floeter
2008-08-08add a variable $SERVER_NAME which is "OpenBSD relayd" by default.Reyk Floeter
2008-08-08chunked encoding may include empty lines at random places, do notReyk Floeter
abort the session if we get an empty line except of the expected chunk header.
2008-08-08fix possible memleaks in chunked encoding handlerReyk Floeter
2008-08-08only dump all protocol nodes with DEBUG > 1.Reyk Floeter
2008-08-08Support HTTP responses that neither specify a Content-Length headerReyk Floeter
nor chunked encoding. We don't know the length of the HTTP body in this case, so it only works for single-pass HTTP responses without subsequent HTTP response headers in the stream. You can still enforce the Content-Length header with an "expect" rule. For example, this fixes response handling from undeadly.org (thttpd) if relayd is running as a transparent HTTP proxy.
2008-08-08Check gettimeofday() against -1; Add a missing error check in one place.Thordur I. Bjornsson
OK reyk@
2008-07-25doc fix; from David HiggsJason McIntyre
2008-07-23validate packet length in debug dns packet logging before printing the header.Reyk Floeter
2008-07-22Add dynamic IPv6-to-IPv4 and IPv4-to-IPv6 translation inspired byReyk Floeter
faithd(8) by doing a similar mapping of IPv4/6 addresses with relayd(8) and pf(4) redirections without the need of the faith(4) interface. The trick works in both directions, it can accept IPv6 connections and relay them to IPv4 hosts by extracting the last 4 octets from the IPv6 destination (like faithd(8)), and it can accept IPv4 connections and relay them to IPv6 hosts by prepending the 4 octets of the original IPv4 destination to a configured IPv6 prefix. An access list is not needed because the classification is done in pf.conf(5). It helps to get more faith in relayd. manpage bits ok jmc@ yes, sounds good todd@
2008-07-19minor wording tweaks;Jason McIntyre
2008-07-19no need for using a TAILQ queue for the host children list, use aReyk Floeter
singly-linked SLIST instead. the only noticeable change is the reversed order to notify the children but it does not really matter here. also only walk through the children host list if the host itself is a potential parent.
2008-07-19If the new 'parent' keyword is specified for a host in a table,Reyk Floeter
inherit the state from another host with the specified Id; no additional check will be for the inheriting host. This helps in scenarios with lots of IP aliases that all point to the same service on the same host (like web hosting with many SSL domains). discussed with pyr, tested in different setups
2008-07-18terminate the input buffer on failure in print_host()Reyk Floeter
2008-07-17final reorder diff to use TAILQ_INSERT_TAIL instead ofReyk Floeter
TAILQ_INSERT_HEAD. now tables and relays are also matching the order in the config file. ok pyr@
2008-07-17add the hosts in order to get host ids that match the order in the config ↵Reyk Floeter
file. ok pyr@
2008-07-17give sane ids to hosts, tables, redirections, relays, etc. - startReyk Floeter
counting at 1 and do not assign an id before inheriting a real table. makes more sense in the relayctl output. ok pyr@
2008-07-17use getaddrinfo/getnameinfo to parse ipv6 addresses instead ofReyk Floeter
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@
2008-07-16relay_connect() may fail, close the session in the bindany callbackReyk Floeter
if it does.
2008-07-16use getsockname() to find out the local address of a connection beforeReyk Floeter
doing a nat lookup. this fixes nat lookups when the relay is listening to a wildcard IPv4/IPv6 address (like 0.0.0.0 or ::).
2008-07-16fix nat lookup to use the correct pf_addr offset. now it also worksReyk Floeter
with ipv6.
2008-07-09always verify that the received dns response id matches our request.Reyk Floeter
2008-07-09Use OpenBSD's knuth shuffle algorithm of random values from bind toReyk Floeter
produce the DNS request ids instead of a simple per-request arc4random(). This ensure randomness but also satisfies the non-repeating property we need. ok deraadt@
2008-07-09also set the protocol, either TCP or UDP, in the NAT lookup. thisReyk Floeter
unbreaks NAT lookups with UDP; tested as a transparent DNS relay.