Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

http daemon bind doesn't respect socket address from config file #58

Open
cahlbin opened this issue Aug 24, 2017 · 0 comments
Open

http daemon bind doesn't respect socket address from config file #58

cahlbin opened this issue Aug 24, 2017 · 0 comments

Comments

@cahlbin
Copy link

cahlbin commented Aug 24, 2017

config.json:

{
  ...
  "http" : "127.0.0.1:8080",
  ...
}

Expected: brubeck should bind only to the loopback interface / 127.0.0.1.

Actual: brubeck binds it's http listener on all interfaces (see *:8080 below)

[localhost]# ss -tulpn | grep brubeck
udp    UNCONN     0      0      127.0.0.1:8125     *:*     users:(("brubeck",pid=27614,fd=6))
tcp    LISTEN     0      32     *:8080             *:*     users:(("brubeck",pid=27614,fd=7))

Possible fix is to parse out the address from the "http" bind string and pass along as MHD_OPTION_SOCK_ADDR in brubeck_http_endpoint_init.

See

void brubeck_http_endpoint_init(struct brubeck_server *server, const char *listen)

mmakassikis added a commit to mmakassikis/brubeck that referenced this issue Nov 17, 2018
By default, the http endpoint is started on the IPv4 wildcard address.
It may be desirable to restrict this to a specific address (see issue github#58).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant