1 diff -ur mod_rpaf-0.5/mod_rpaf.c mod_rpaf-0.5.ipv6/mod_rpaf.c
2 --- mod_rpaf-0.5/mod_rpaf.c 2004-03-17 17:47:30.000000000 +0200
3 +++ mod_rpaf-0.5.ipv6/mod_rpaf.c 2006-01-05 18:18:09.000000000 +0200
7 r->connection->remote_ip = ap_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]);
8 - r->connection->remote_addr.sin_addr.s_addr = inet_addr(r->connection->remote_ip);
9 + switch (r->connection->remote_addr.ss_family) {
11 + inet_pton(AF_INET, r->connection->remote_ip, &((struct sockaddr_in*)&r->connection->remote_addr)->sin_addr.s_addr);
14 + inet_pton(AF_INET6, r->connection->remote_ip, ((struct sockaddr_in6*)&r->connection->remote_addr)->sin6_addr.s6_addr);
17 + ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r, "Apache doesn't support this address family");
21 if (cfg->sethostname) {
22 const char *hostvalue;
23 if (hostvalue = ap_table_get(r->headers_in, "X-Forwarded-Host")) {