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

« back to all changes in this revision

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