closing early (see line 343) and the ap_listeners list being
nonsense.
End result is a segfault if something is already listening on ::
on our port when httpd is started.
Submitted by: Colm MacCarthaigh <colm@stdlib.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101338
13f79535-47bb-0310-9956-
ffa450edef68
ap_listeners = lr->next;
}
- /* So that previous becomes NULL in the next iteration */
- lr = NULL;
+ /* Although we've removed ourselves from the list,
+ * we need to make sure that the next iteration won't
+ * consider "previous" a working IPv6 '::' socket.
+ * Changing the family is enough to make sure the
+ * conditions before make_sock() fail.
+ */
+ lr->bind_addr->family = AF_INET;
continue;
}