Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274614 - www-servers/nginx ipv6-enabled ebuild patch
Summary: www-servers/nginx ipv6-enabled ebuild patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Konstantin Arkhipov (RETIRED)
URL:
Whiteboard:
Keywords:
: 260681 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-18 14:11 UTC by Piotr Karbowski (RETIRED)
Modified: 2009-07-19 14:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to add ipv6 use flag (nginx-0.7.59.ebuild-ipv6.patch,812 bytes, patch)
2009-06-18 14:12 UTC, Piotr Karbowski (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Karbowski (RETIRED) gentoo-dev 2009-06-18 14:11:03 UTC
Nginx support IPv6 but ebuild dont have USE-flag for it.

Reproducible: Always

Steps to Reproduce:
Comment 1 Piotr Karbowski (RETIRED) gentoo-dev 2009-06-18 14:12:30 UTC
Created attachment 195083 [details, diff]
patch to add ipv6 use flag
Comment 2 Robert Buchholz (RETIRED) gentoo-dev 2009-07-08 23:48:32 UTC
*** Bug 260681 has been marked as a duplicate of this bug. ***
Comment 3 Petr Polezhaev 2009-07-09 06:58:48 UTC
in reply to bug 260681#c2
Yes, it is, nginx still have some problems with epoll reloading with ipv6 enabled and can only listen on it, without proxying. But it is very usefull even with such limitations. Using both IPv4 and IPv6, without using IPv6-mapped-IPv4-addresses untested.

Probably warning about experimental nature required. Maybe reload feature must be masked untill epoll fixed, if ipv6 enabled.

About bug: it was 3 month older that this, and "patch" was described in words, but it doesn't matter.
Comment 4 Petr Polezhaev 2009-07-09 08:54:49 UTC
About inet_pton: assuming "current version" as 0.8.4: I've found, that my previous decision was wrong. It couldn't be a inet_pton bug, as it not binds anything.

Futhermore, from 0.7.42 there is 'listen' option 'ipv6only=on', which will add corresponding sockopt, but it work only for 'default' socket ('listen' flag 'default') and there is no such option for IPv4 (so IPv4 will ). So it is possible to use both IPv4 (not mapped) and IPv6 on same port (for reasons of IPv4/IPv6-only sites or nice logs):

You should specify some 'default' server for every binded socket and bind all IPv6 sockets, which should be used with IPv4 ones, as 'ipv6only'. Any futher uses of such sockets will reuse already existing, without bind,

Example:
server { #server1
   listen [::]:80 default ipv6only=on;
   listen 80;

   ...
}

server { #server2
   listen [::]:80;
   listen 443 default ssl;
}

server { #server3
   listen [::]:443 default ipv6only=on;
}

It will result in:
server1 will listen on 0.0.0.0:80 AND on [::]:80 - different binds. All connections comming from IPv4 will be listed in logs with normal ipv4 addresses

server2 will listen on [::]:80 - reusing socket from server1, and on IPv4-only socket 0.0.0.0:443 defaulting it as ssl port.

server3 will listen only on IPv6-only socket [::]:443, which is not default ssl.

-----

Also note, that when using [::]:<port> without ipv6-only it should be only default IPv6 addr for this port (as otherwise other socket may be binded before this and wildcard will be blocked) and you should not use IPv4 addresses on this port, as nginx don't understand that wildcard IPv6 addresses also mapped IPv4.

--------------

So, only reload problem exists.
Comment 5 Dawid Węgliński (RETIRED) gentoo-dev 2009-07-13 22:11:33 UTC
As commented on the other bug, no answer from maintainer - i'll fix this in my free time this week.
Comment 6 Dawid Węgliński (RETIRED) gentoo-dev 2009-07-19 14:56:47 UTC
Fixed in 0.8.4-r1.