Package: libapache2-mod-rpaf
Severity: wishlist

mod_rpaf does not understand X-Real-IP header - the more specific header
userd by revers proxies instead of adding real ip address to
X-Forwarde-For

patch for mod_rpaf-2.0.c:
73a74,75
> #include <arpa/inet.h>
> 
142,143c144,149
<     if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) {
<         if (fwdvalue = apr_table_get(r->headers_in, "X-Forwarded-For")) {
---
>     if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1)  {
>         if (fwdvalue = (char *) apr_table_get(r->headers_in,
>         "X-Real-IP")) {
>             r->connection->remote_ip = fwdvalue;
>             r->connection->remote_addr->sa.sin.sin_addr.s_addr =
>             apr_inet_addr(r->connection->remote_ip);
>         }
>         else if (fwdvalue = (char *) apr_table_get(r->headers_in,
>         "X-Forwarded-For")) {


for mod_rpaf.c patch is almost the same - but ap_table_get should be
used instead of apr_table_get and inet_addr instead of apr_inet_addr


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.16-2-686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.koi8r (charmap=KOI8-R) (ignored: 
LC_ALL set to ru_RU.koi8r)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to