"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: gotwebd: fix unix-domain sockets + IPv6
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 16 Aug 2022 10:32:38 -0600

Download raw body.

Thread
On Tue, Aug 16, 2022 at 06:24:56PM +0200, Stefan Sperling wrote:
> parse.y must only fetch IP addresses if FCGI mode is enabled for a server.
> Otherwise, on IPv6 enabled-systems, a gotwebd unix-domain socket server
> will still try to listen on IPv6 by default.
> 
> Found via debug log output:
> 
> config_getsock: name=localhost-unix_child id=3 server=localhost-unix \
> 	child_id=0 parent_id=1 type=fcgi ipv4=0 ipv6=1 socket_path=none
> 
> ok?

ok

>  
> diff e087e1f6e7b926dcff23d90de416399c114d582e 93d778c7f2208a24a4a3f9f5ccf8c8abd0fcae7b
> commit - e087e1f6e7b926dcff23d90de416399c114d582e
> commit + 93d778c7f2208a24a4a3f9f5ccf8c8abd0fcae7b
> blob - 6a19cc971eac7c808d5e66cf765ae45df9f34677
> blob + 0ca15455603ce181da678196d0433365c1fc92df
> --- gotwebd/parse.y
> +++ gotwebd/parse.y
> @@ -251,10 +251,13 @@ server		: SERVER STRING {
>  			log_debug("adding server %s", $2);
>  			free($2);
>  		} '{' optnl serveropts2 '}' {
> -			if (get_addrs(new_srv->fcgi_socket_bind,
> -			    &new_srv->al, new_srv->fcgi_socket_port) == -1) {
> -				yyerror("could not get tcp iface addrs");
> -				YYERROR;
> +			if (new_srv->fcgi_socket) {
> +				if (get_addrs(new_srv->fcgi_socket_bind,
> +				    &new_srv->al, new_srv->fcgi_socket_port)
> +				    == -1) {
> +					yyerror("could not get tcp iface addr");
> +					YYERROR;
> +				}
>  			}
>  		}
>  		;
> 

-- 

Tracey Emery