Commit Briefs

4cc4e7dc85 Rafael Sadowski

reject obs-fold with 400 (RFC 9112 5.2) (obs-fold)

Replace silent kv_extend normalisation with an unconditional 400. RFC 9112 5.2 explicitly permits rejection; it is the safer choice over SP replacement, which hides parser ambiguity downstream.


caed4502ee Rafael Sadowski

Add regress from base (devel)


b400ca1d90 tb

relayd: remove X509_dup() call that leaks memory (main)

While there, add error checks for X509_set_{pubkey,issuer_name}(). From Marc Jorge


ee25970966 rsadowski

relayd: add support for the MKCALENDAR HTTP method

relayd is missing this method from the WebDAV/CalDAV extensions. This causes issues when using relayd as a reverse proxy in front of CalDAV servers like Nextcloud. OK kirill@


b9e7693297 rsadowski

relayd: fix DEBUG build

feedback and OK tb@


e9c398966c kirill

usr.sbin/relayd: support multiple resolveble addresses.

relayd supports interface name, DNS hostname or interface group at listen on but it binds only to the first discovered IP address which is usually IPv4. Here I changed parser to create a dedicated listener for each discovered and confiugred on a local inerface address. This means that listen on egress port 80 binds to all IPv4 and IPv6 addresses on the egress group. OK: rsadowski@


05a099a8f4 kirill

usr.sbin/relayd: handle HTTP responses without bodies

RFC 9112 section 6.3 specifies that responses to HEAD requests, and responses with 1xx, 204, or 304 status codes, are terminated by the empty line after the header section regardless of Content-Length or Transfer-Encoding. They cannot contain a message body or trailer section. Teach relayd to apply that framing rule before deciding whether a response body is bounded. Otherwise relayd treats these responses as unbounded, adds Connection: close, and can forward both the backend's Connection: keep-alive and its own Connection: close. Tweaks and OK: rsadowski@


cc2ec1f7a0 rsadowski

relayd: use explicit_bzero in ssl_password_cb

This replaces bzero with explicit_bzero in the SSL password callback. Since ssl_password_cb handles sensitive data a standard bzero could be optimized away by the compiler. Additionally, this ensures the buffer is cleared if strlcpy fails due to truncation, preventing password fragments from lingering in memory. OK renaud@, kirill@


36dd1e7a7b rsadowski

relayd: allow explicit paths for certificates, keys and OCSP staples

Extend the "keypair" keyword in relayd.conf to support optional explicit paths. Previously, relayd enforced a naming convention, looking up files in /etc/ssl and /etc/ssl/private based on the keypair name. This change allows other applications to manage their certificates without having to comply with relayd's internal naming logic. Input and OK kirill@, help form tb@


e64b43bec6 kirill

relayd: support TLS with multiple listeners

Fix a bug in relay_inherit() which runs only relay_load_certfiles(conf, rb, NULL) unconditionally which isn't alligned with logic in parser when it parses relay block, where multiple certificates are load as relay_load_certfiles(conf, rb, NULL) only if here no tlscerts (for default host) and otherwise it loads keypairs. OK: rsadowski@


0c9dbe7737 op

fix memory leak in config_purge() when dealing CONFIG_PROTOS

original diff from CypherFox (openbsd at cypher-fox com), thanks! slightly rearranged to be a bit smaller by me, but still equivalent.


8b2ee1ae14 op

remove dup block that tries to close tls client ca fd

it's already closed and fd set to -1 a few lines above. diff from Marc Jorge (openbsd [at] cypher-fox com), thanks!


88acf51a5d tb

relay_tls_ctx_create: plug tls_cfg leak

If the second tls_cfg_new() call fails, the tls_cfg is leaked. From Jan Schreiber


4c3a9f7f9d tb

relayd: error check bsearch in relay_httperror_byid()

If relay_httperror_byid() is passed a HTTP error code not in the table this would result in a NULL deref. The intent is that the code fall back to "Unknown error" on NULL return. From Jan Schreiber


7ef192f50c tb

relayd: fix NULL check for strdup()

Due to a copy-paste error, relay_lookup_query() would check the wrong kv member for NULL. From Jan Schreiber


192c004f0b rsadowski

Move HTTP start-line logic to a dedicated function

This is a structural refactoring with no functional change. OK kirill


a065ee49d9 rsadowski

Fix relayd reload race crash

Instead of terminating with fatalx() when a private key hash cannot be found, log a warning and send an error back to the relay worker. This prevents a race condition during "reload" where a request might reach the CA process while keys are being repopulated. Reported by Nick Owens; thanks! OK tb@


802f4c9621 tb

relayd: replace unneeded engine.h with needed x509.h

Adjust a comment. Being non-existent, the OpenSSL engine layer cannot be responsible for whatever unholy hacks this code requires.


18abd06bbe rsadowski

Set User-Agent for HTTP healthchecks

Joel Carnat (Thanks) notice that GoToSocial does not like it when we sent no User-Agent and returns an HTTP/418. Lloyd pointed to use RELAYD_SERVERNAME instead hardcoded "relayd" OK sthen, claudio (diff without RELAYD_SERVERNAME)


499b552cbb tb

relayd/log.h: missed cvs add


6b5c400043 rsadowski

Standardize logging with bgpd

OK claudio@


7d3002f34b rsadowski

imsg_composev() / imsgbuf_flush() handle return values

OK claudio@


3ec811e2b4 rsadowski

fix memory leak in rsae_send_imsg

If the cookie doesn't match, we bail with a continue and totally forget to free the imsg. OK claudio@


80347df32a kirill

usr.sbin/relayd: add support for PROXY protocol in TCP relays

patch from Christoph Liebender OK: rsadowski@


4f8b63696d schwarze

Slightly iprove a confusing wording in the parse.y manuals:

The things that need quoting are not necessarily "argument names", and not even necessarily "names" at all, so just talk about "arguments". "I guess?" florian@ and no objection from otto@, both back in July 2025. Actually, the quoting rules are more complicated than the text makes believe, but i do not know how to better describe them. It may not be easy because some suspect the implementation may be somewhat adhoc rather than based on cleary defined lexical rules.