- ipv6 patch, based on mod_perl-v6.patch auto/ac/apache1-mod_rpaf-0_5-1
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 5 Jan 2006 17:00:33 +0000 (17:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache1-mod_rpaf-ipv6.patch -> 1.1

apache1-mod_rpaf-ipv6.patch [new file with mode: 0644]

diff --git a/apache1-mod_rpaf-ipv6.patch b/apache1-mod_rpaf-ipv6.patch
new file mode 100644 (file)
index 0000000..55f6b7c
--- /dev/null
@@ -0,0 +1,23 @@
+diff -ur mod_rpaf-0.5/mod_rpaf.c mod_rpaf-0.5.ipv6/mod_rpaf.c
+--- mod_rpaf-0.5/mod_rpaf.c    2004-03-17 17:47:30.000000000 +0200
++++ mod_rpaf-0.5.ipv6/mod_rpaf.c       2006-01-05 18:18:09.000000000 +0200
+@@ -148,7 +148,18 @@
+                     ++fwdvalue;
+             }
+             r->connection->remote_ip = ap_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
+-            r->connection->remote_addr.sin_addr.s_addr = inet_addr(r->connection->remote_ip);
++                      switch (r->connection->remote_addr.ss_family) {
++                      case AF_INET:
++                              inet_pton(AF_INET, r->connection->remote_ip, &((struct sockaddr_in*)&r->connection->remote_addr)->sin_addr.s_addr);
++                              break;
++                      case AF_INET6:
++                              inet_pton(AF_INET6, r->connection->remote_ip, ((struct sockaddr_in6*)&r->connection->remote_addr)->sin6_addr.s6_addr);
++                              break;
++                      default:
++                              ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r, "Apache doesn't support this address family");
++                              break;
++                      }
++
+             if (cfg->sethostname) {
+                 const char *hostvalue;
+                 if (hostvalue = ap_table_get(r->headers_in, "X-Forwarded-Host")) {
This page took 0.107044 seconds and 4 git commands to generate.