ASF Bugzilla – Attachment 2461 Details for
Bug 11030
Listen <hostname>: double bind
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 1.29 KB, created by
David Shane Holden
on 2002-07-24 03:30:59 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
David Shane Holden
Created:
2002-07-24 03:30:59 UTC
Size:
1.29 KB
patch
obsolete
>Index: server/listen.c >=================================================================== >RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v >retrieving revision 1.80 >diff -u -3 -r1.80 listen.c >--- server/listen.c 15 Jul 2002 08:05:10 -0000 1.80 >+++ server/listen.c 24 Jul 2002 03:19:06 -0000 >@@ -71,6 +71,10 @@ > #include "mpm.h" > #include "mpm_common.h" > >+#if APR_HAVE_NETDB_H >+#include <netdb.h> >+#endif >+ > ap_listen_rec *ap_listeners = NULL; > > #if APR_HAVE_IPV6 >@@ -245,8 +249,20 @@ > char *oldaddr; > apr_port_t oldport; > apr_sockaddr_t *sa; >+ struct hostent *hostdata; >+ apr_in_addr_t *hostaddr; > >- if (!addr) { /* don't bind to specific interface */ >+ if (addr) { /* resolve addr into an ip address */ >+ if (!(hostdata = gethostbyname (addr))) { >+ ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, process->pool, >+ "alloc_listener: failed to resolve ip address of %s", >+ addr); >+ return "Listen setup failed"; >+ } >+ hostaddr = (apr_in_addr_t *)(hostdata->h_addr); >+ addr = inet_ntoa (*hostaddr); >+ } >+ else { /* don't bind to specific interface */ > find_default_family(process->pool); > switch(default_family) { > case APR_INET:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11030
:
2435
| 2461