You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jw...@apache.org on 2003/09/28 18:30:43 UTC
cvs commit: httpd-2.0/server listen.c
jwoolley 2003/09/28 09:30:43
Modified: server listen.c
Log:
Setting lr = NULL on line 399 leads the the loop
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 <co...@stdlib.net>
Revision Changes Path
1.93 +7 -2 httpd-2.0/server/listen.c
Index: listen.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/listen.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -u -r1.92 -r1.93
--- listen.c 3 Sep 2003 19:27:09 -0000 1.92
+++ listen.c 28 Sep 2003 16:30:43 -0000 1.93
@@ -395,8 +395,13 @@
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;
}