diff options
author | Denis Vlasenko | 2007-09-29 23:55:30 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-09-29 23:55:30 +0000 |
commit | 43f0a0bb3a178794ac9fa3f5010db680c5d1b018 (patch) | |
tree | 7f3c2fae714d8260c100fbad6627c7ae4e8c43fe /networking | |
parent | e755e827f7c8ecb21787a4369d7afdeda54d112b (diff) | |
download | busybox-43f0a0bb3a178794ac9fa3f5010db680c5d1b018.zip busybox-43f0a0bb3a178794ac9fa3f5010db680c5d1b018.tar.gz |
apply all post-1.7.1 patches, set version to 1.7.21_7_2
Diffstat (limited to 'networking')
-rw-r--r-- | networking/httpd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index a888c24..e67e6bd 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -598,7 +598,7 @@ static void parse_conf(const char *path, int flag) ++p; /* so keep last character */ } *p = '\0'; - sprintf(p0, "%s:%s", p0, c); + sprintf(p0 + strlen(p0), ":%s", c); } #endif @@ -1602,6 +1602,13 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) if (fromAddr->sa.sa_family == AF_INET) { rmt_ip = ntohl(fromAddr->sin.sin_addr.s_addr); } +#if ENABLE_FEATURE_IPV6 + if (fromAddr->sa.sa_family == AF_INET6 + && fromAddr->sin6.sin6_addr.s6_addr32[0] == 0 + && fromAddr->sin6.sin6_addr.s6_addr32[1] == 0 + && ntohl(fromAddr->sin6.sin6_addr.s6_addr32[2]) == 0xffff) + rmt_ip = ntohl(fromAddr->sin6.sin6_addr.s6_addr32[3]); +#endif if (ENABLE_FEATURE_HTTPD_CGI || DEBUG || verbose) { rmt_ip_str = xmalloc_sockaddr2dotted(&fromAddr->sa); } |