nginx reloading not working with IPv6 enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I've an ubuntu 10.04.3 server that can't reload nginix configuration due to the following bug.
From: http://
The function ngx_cmp_sockaddr contained a typo which prevented nginx
from reloading, because nginx tried to add a socket multiple times
to an epoll descriptor.
--- src/core/
+++ src/core/
@@ -847,7 +847,7 @@
sin61 = (struct sockaddr_in6 *) sa1;
sin62 = (struct sockaddr_in6 *) sa2;
- if (sin61->sin6_port != sin61->sin6_port) {
+ if (sin61->sin6_port != sin62->sin6_port) {
return NGX_DECLINED;
}
If nginx listened on an IPv6 address on multiple ports (e.g. [::]:80
and [::]:443), the port is ignored and thus a socket is added multiple
times, because the sockets are kept an a linked list and once a match
is found the list is not searched any further and the first socket
gets always selected and added via epoll_ctl.
Related branches
Changed in nginx (Ubuntu Lucid): | |
status: | New → In Progress |
assignee: | nobody → Mahyuddin Susanto (udienz) |
Changed in nginx (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in nginx (Ubuntu Lucid): | |
assignee: | Mahyuddin Susanto (udienz) → nobody |
tags: |
added: verification-done removed: verification-needed |
Status changed to 'Confirmed' because the bug affects multiple users.