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

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: gotwebd: listen on localhost by default
To:
gameoftrees@openbsd.org
Date:
Fri, 19 Aug 2022 10:38:37 -0600

Download raw body.

Thread
On Fri, Aug 19, 2022 at 06:37:10PM +0200, Stefan Sperling wrote:
> Unless the config file says otherwise, gotwebd should listen
> on localhost only.
>  
> Ok?

as discussed, ok

> 
> diff 610dd8c9f454e1625b0eddc16af87b765279b0a5 00a9b4c2245a248314d8d9dc799088f4dbd9c5b7
> commit - 610dd8c9f454e1625b0eddc16af87b765279b0a5
> commit + 00a9b4c2245a248314d8d9dc799088f4dbd9c5b7
> blob - 7c62ab08d5caf265c2e5a4163965438fd218b859
> blob + 5063726b9a209a27338b1b4ac917758c171bcac9
> --- gotwebd/parse.y
> +++ gotwebd/parse.y
> @@ -1322,13 +1322,13 @@ int
>  get_addrs(const char *addr, struct addresslist *al, in_port_t port)
>  {
>  	if (strcmp("", addr) == 0) {
> -		if (host("0.0.0.0", al, 1, port, "0.0.0.0", -1) <= 0) {
> +		if (host("127.0.0.1", al, 1, port, "127.0.0.1", -1) <= 0) {
>  			yyerror("invalid listen ip: %s",
> -			    "0.0.0.0");
> +			    "127.0.0.1");
>  			return (-1);
>  		}
> -		if (host("::", al, 1, port, "::", -1) <= 0) {
> -			yyerror("invalid listen ip: %s", "::");
> +		if (host("::1", al, 1, port, "::1", -1) <= 0) {
> +			yyerror("invalid listen ip: %s", "::1");
>  			return (-1);
>  		}
>  	} else {
> 

-- 

Tracey Emery