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

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: gotwebd.conf: remove fcgi_socket keyword
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 29 Aug 2022 08:53:41 +0200

Download raw body.

Thread
On 2022/08/29 06:41:04 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> On Sun, Aug 21, 2022 at 11:00:48AM +0200, Stefan Sperling wrote:
> > On Sun, Aug 21, 2022 at 12:23:21AM +0200, Omar Polo wrote:
> > > On 2022/08/20 22:15:51 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> > > > On Sat, Aug 20, 2022 at 05:08:36PM +0200, Omar Polo wrote:
> > > > > I had an issue with it: gotwebd binds the wrong port.  I think there's
> > > > > an extra `htons' in the fcgiport rule.  with that dropped, i can
> > > > > happily have gotwebd listen on localhost:9000.
> > > > 
> > > > Ah, thanks. I will take a look.
> > > 
> > > As far as i can see we're storing the port number in hots byte order,
> > > in fact getservice does ntohs on the port returned by getservbyname
> > > (which is in network byte order) and then we convert them to network
> > > byte order in sockets_create_socket.
> > > 
> > > however, the NUMBER part of the fcgiport grammar rule parse the number
> > > and converts it to network byte order.  the we will convert it again
> > > to network byte order in sockets_create_socket...
> > > 
> > > > > @@ -159,7 +159,7 @@ fcgiport	: NUMBER {
> > > > >  				yyerror("invalid port: %lld", $1);
> > > > >  				YYERROR;
> > > > >  			}
> > > > > -			$$ = htons($1);
> > > > > +			$$ = $1;
> > 
> > ok stsp@
> 
> This fix did not get committed yet, did it?
> 
> I am about to rewrite the grammar for port numbers in gotwebd.conf.
> I can fix this issue along the way.

sure!

i was waiting for the grammar diff to be committed before committing
this and the `listen on socket' but feel free to include them if
you're working on it :)