Project

General

Profile

Actions

Feature #3198

closed

Add support for unix domain sockets in extforward.forwarder

Added by flynn over 1 year ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Normal
Category:
mod_extforward
Target version:
ASK QUESTIONS IN Forums:
No

Description

The configuration option

extforward.forwarder = ( "/var/lib/haproxy/lighttpd" => "trust")

does not support unix domain listen sockets, it results in the following error message:
2023-04-05 18:08:13: (mod_extforward.c.242) ERROR: invalid netmask: /var/lib/haproxy/lighttpd
 var/lib/haproxy/lighttpd
2023-04-05 18:08:13: (mod_extforward.c.348) unexpected value for extforward.forwarder

At the moment I must use
extforward.forwarder = ( "all" => "trust")

to use haproxy Proxy protocol later.
Please allow unix domain sockets in extforward.forwarder

Actions #1

Updated by gstrauss over 1 year ago

Does this work for you? Note: UNTESTED

--- a/src/mod_extforward.c
+++ b/src/mod_extforward.c
@@ -246,6 +246,7 @@ static void * mod_extforward_parse_forwarder(server *srv, const array *forwarder
         data_string * const ds = (data_string *)forwarder->data[j];
         char * const nm_slash = strchr(ds->key.ptr, '/');
         if (NULL == nm_slash) continue;
+        if (ds->key.ptr[0] == '/') continue; /*no mask for unix domain sockets*/
         if (buffer_is_blank(&ds->value)) continue; /* ignored */

         char *err;

Actions #2

Updated by flynn over 1 year ago

Tested and works for me!

Actions #3

Updated by gstrauss over 1 year ago

  • Status changed from New to Patch Pending
Actions #4

Updated by gstrauss over 1 year ago

  • Status changed from Patch Pending to Fixed
Actions

Also available in: Atom