- outdated
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 14 Jan 2008 16:43:48 +0000 (16:43 +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.2
    apache1-mod_rpaf_degtine.patch -> 1.2

apache1-mod_rpaf-ipv6.patch [deleted file]
apache1-mod_rpaf_degtine.patch [deleted file]

diff --git a/apache1-mod_rpaf-ipv6.patch b/apache1-mod_rpaf-ipv6.patch
deleted file mode 100644 (file)
index 55f6b7c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-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")) {
diff --git a/apache1-mod_rpaf_degtine.patch b/apache1-mod_rpaf_degtine.patch
deleted file mode 100644 (file)
index 8c67e5e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---- mod_rpaf-0.5.orig/mod_rpaf-2.0.c   2004-03-17 17:47:30.000000000 +0200
-+++ mod_rpaf-0.5/mod_rpaf-2.0.c        2007-09-27 13:23:45.335194758 +0300
-@@ -130,6 +130,16 @@
-     return 0;
- }
-+static char* last_not_in_array(apr_array_header_t *forwarded_for,
-+                             apr_array_header_t *proxy_ips) {
-+    int i;
-+    for (i = (forwarded_for->nelts)-1; i > 0; i--) {
-+      if (!is_in_array(((char **)forwarded_for->elts)[i], proxy_ips))
-+          break;
-+    }
-+    return ((char **)forwarded_for->elts)[i];
-+}
-+
- static int change_remote_ip(request_rec *r) {
-     const char *fwdvalue;
-     char *val;
-@@ -147,7 +157,7 @@
-                 if (*fwdvalue != '\0')
-                     ++fwdvalue;
-             }
--            r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
-+            r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
-             r->connection->remote_addr->sa.sin.sin_addr.s_addr = inet_addr(r->connection->remote_ip);
-             if (cfg->sethostname) {
-                 const char *hostvalue;
---- mod_rpaf-0.5.orig/mod_rpaf.c       2007-09-27 13:23:30.864865219 +0300
-+++ mod_rpaf-0.5/mod_rpaf.c    2007-09-27 13:23:59.885526119 +0300
-@@ -130,6 +130,16 @@
-     return 0;
- }
-+static char* last_not_in_array(array_header *forwarded_for,
-+                             array_header *proxy_ips) {
-+    int i;
-+    for (i = (forwarded_for->nelts)-1; i > 0; i--) {
-+      if (!is_in_array(((char **)forwarded_for->elts)[i], proxy_ips))
-+          break;
-+    }
-+    return ((char **)forwarded_for->elts)[i];
-+}
-+
- static int change_remote_ip(request_rec *r) {
-     const char *fwdvalue;
-     char *val;
-@@ -147,7 +157,7 @@
-                 if (*fwdvalue != '\0')
-                     ++fwdvalue;
-             }
--            r->connection->remote_ip = ap_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
-+            r->connection->remote_ip = ap_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
-                       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);
This page took 0.029621 seconds and 4 git commands to generate.