unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.45k stars 686 forks source link

uwsgi --nagios --socket doesn't work with ipv6 adresses or hostnames #896

Open waipu opened 9 years ago

waipu commented 9 years ago

It just does something very wrong with ipv6 address or hostname: uwsgi --nagios --socket '2002:xxxx:xxxx:3::3:8001' case: connect(3, {sa_family=AF_INET, sin_port=htons(470), sin_addr=inet_addr("0.0.7.209")}, 16) = -1 EINVAL (Invalid argument) uwsgi --nagios --socket '[2002:xxxx:xxxx:3::3]:8001' or hostname:port case: connect(3, {sa_family=AF_INET, sin_port=htons(470), sin_addr=inet_addr("255.255.255.255")}, 16) = -1 ENETUNREACH (Network is unreachable) I think that normal syntax is one without square brackets, but socket option still doesn't understand it, and binds to ipv4 if only port is specified.

unbit commented 9 years ago

The problem is related to the one reported in the mailing-list yesterday:

http://lists.unbit.it/pipermail/uwsgi/2015-April/007977.html

basically we need to add ipv6 support to the uwsgi_connect() and uwsgi_reslove_ip() api functions.

I will report here when we expect to implement it