httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16317] - 64 bits build on HP-UX logs all IP addresses as 0.0.0.0
Date Sat, 25 Jan 2003 12:15:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16317>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16317

64 bits build on HP-UX logs all IP addresses as 0.0.0.0





------- Additional Comments From trawick@apache.org  2003-01-25 12:15 -------
Well, I'm no expert on gdb and HP-UX...  it worked fine for me on Linux.

Here is a more rudimentary approach which should work everywhere.
Apply the patch below to srclib/apr/network_io/unix/sockaddr.c, then 
make && make install && send another request in.  The details should
be in error log looking like this, and you can submit that data...

apr_sockaddr_t at 0x81ea9e8 maps to 127.0.0.1,
byte 0: 38
byte 1: A9
byte 2: 1E
byte 3: 08
byte 4: 00
byte 5: 00
byte 6: 00
byte 7: 00
byte 8: 00
byte 9: 00
byte 10: 00
byte 11: 00
byte 12: E9
byte 13: 4D
byte 14: 00
byte 15: 00
byte 16: 02
byte 17: 00
byte 18: 00
byte 19: 00
byte 20: 02
byte 21: 00
byte 22: 4D
byte 23: E9
(and on through byte 63 or so... yes, ugly)

Here's the patch:
--- srclib/apr/network_io/unix/sockaddr.c.orig  Mon Jan 20 17:53:59 2003
+++ srclib/apr/network_io/unix/sockaddr.c       Sat Jan 25 06:59:09 2003
@@ -182,11 +182,21 @@
 APR_DECLARE(apr_status_t) apr_sockaddr_ip_get(char **addr,
                                          apr_sockaddr_t *sockaddr)
 {
+    int i;
+
     *addr = apr_palloc(sockaddr->pool, sockaddr->addr_str_len);
     apr_inet_ntop(sockaddr->family,
                   sockaddr->ipaddr_ptr,
                   *addr,
                   sockaddr->addr_str_len);
+    fprintf(stderr, "apr_sockaddr_t at %p maps to %s,\n",
+            sockaddr, *addr);
+    for (i = 0; i < sizeof(apr_sockaddr_t); i++) {
+        fprintf(stderr,
+                "byte %d: %02X\n",
+                i, (unsigned int)((unsigned char *)sockaddr)[i]);
+    }
+    fflush(stderr);
 #if APR_HAVE_IPV6
     if (sockaddr->family == AF_INET6 &&
         IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sockaddr->ipaddr_ptr)) {

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message