~ubuntu-branches/ubuntu/utopic/libapache2-mod-rpaf/utopic

« back to all changes in this revision

Viewing changes to .pc/011_apache2.4.patch/mod_rpaf-2.0.c

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2014-01-24 10:24:27 UTC
  • Revision ID: package-import@ubuntu.com-20140124102427-n3fpssca644wg4z7
Tags: 0.6-12
* Add transition notes
* Fix lintian error: vcs-field-not-canonical
* Bump up Standards-Version (to 3.9.5)
* Add --no-silent to LTFLAGS
* Restore 030_ipv6.patch, removed by QA upload in 0.6-1 (Closes: #726529)
* Refresh patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
#include "http_vhost.h"
73
73
#include "apr_strings.h"
74
74
 
 
75
#include <arpa/inet.h>
 
76
 
75
77
module AP_MODULE_DECLARE_DATA rpaf_module;
76
78
 
77
79
typedef struct {
195
197
            apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
196
198
            r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
197
199
            r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
 
200
            apr_sockaddr_t *tmpsa;
 
201
            int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool);
 
202
            if (ret == APR_SUCCESS)
 
203
                memcpy(r->connection->remote_addr, tmpsa, sizeof(apr_sockaddr_t));
198
204
            if (cfg->sethostname) {
199
205
                const char *hostvalue;
200
206
                if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {