FreeBSD Bugzilla – Attachment 170839 Details for
Bug 209869
www/mod_rpaf2: [PATCH] update to v0.8.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff www/mod_rpaf2
mod_rpaf2.diff (text/plain), 4.56 KB, created by
geoffroy desvernay
on 2016-05-30 19:29:27 UTC
(
hide
)
Description:
svn diff www/mod_rpaf2
Filename:
MIME Type:
Creator:
geoffroy desvernay
Created:
2016-05-30 19:29:27 UTC
Size:
4.56 KB
patch
obsolete
>Index: www/mod_rpaf2/Makefile >=================================================================== >--- www/mod_rpaf2/Makefile (revision 415376) >+++ www/mod_rpaf2/Makefile (working copy) >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= mod_rpaf >-PORTVERSION= 0.6 >-PORTREVISION= 3 >+PORTVERSION= 0.8.4 > CATEGORIES= www > PKGNAMESUFFIX= 2 > >@@ -12,13 +11,15 @@ > > USE_GITHUB= yes > GH_ACCOUNT= gnif >-GH_TAGNAME= bc7a495 >+GH_TAGNAME= v0.8.4 > >+DOCS= README.md >+ > USE_APACHE= 22+ > AP_FAST_BUILD= yes > AP_GENPLIST= yes > SHORTMODNAME= rpaf > >-SRC_FILE= mod_rpaf-2.0.c >+SRC_FILE= mod_rpaf.c > > .include <bsd.port.mk> >Index: www/mod_rpaf2/distinfo >=================================================================== >--- www/mod_rpaf2/distinfo (revision 415376) >+++ www/mod_rpaf2/distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (gnif-mod_rpaf-0.6-bc7a495_GH0.tar.gz) = 051b7c21ee72c96d95e43eba6ff8eeb6979da3b70c9e9b300b38f3074514a2ae >-SIZE (gnif-mod_rpaf-0.6-bc7a495_GH0.tar.gz) = 7645 >+SHA256 (gnif-mod_rpaf-0.8.4-v0.8.4_GH0.tar.gz) = b78f292d7336f839527d6fb2213116c995a525ad9aa38c344c485abbd76848f5 >+SIZE (gnif-mod_rpaf-0.8.4-v0.8.4_GH0.tar.gz) = 6458 >Index: www/mod_rpaf2/files/patch-mod_rpaf-2.0.c >=================================================================== >--- www/mod_rpaf2/files/patch-mod_rpaf-2.0.c (revision 415376) >+++ www/mod_rpaf2/files/patch-mod_rpaf-2.0.c (nonexistent) >@@ -1,66 +0,0 @@ >-PR: ports/179525 Fix for mod_rpaf2 compatibility with Apache 2.4 >-======================================================================== >---- ./mod_rpaf-2.0.c.orig >-+++ ./mod_rpaf-2.0.c >-@@ -86,6 +86,23 @@ >- request_rec *r; >- } rpaf_cleanup_rec; >- >-+ >-+inline apr_sockaddr_t * rpaf_client_addr(conn_rec *c) { >-+#if AP_SERVER_MAJORVERSION_NUMBER >= 2 && AP_SERVER_MINORVERSION_NUMBER >= 4 >-+ return c->client_addr; >-+#else >-+ return c->remote_addr; >-+#endif >-+} >-+ >-+inline char * rpaf_client_ip(conn_rec *c) { >-+#if AP_SERVER_MAJORVERSION_NUMBER >= 2 && AP_SERVER_MINORVERSION_NUMBER >= 4 >-+ return c->client_ip; >-+#else >-+ return c->remote_ip; >-+#endif >-+} >-+ >- static void *rpaf_create_server_cfg(apr_pool_t *p, server_rec *s) { >- rpaf_server_cfg *cfg = (rpaf_server_cfg *)apr_pcalloc(p, sizeof(rpaf_server_cfg)); >- if (!cfg) >-@@ -147,8 +164,9 @@ >- >- static apr_status_t rpaf_cleanup(void *data) { >- rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data; >-- rcr->r->connection->remote_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip); >-- rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip); >-+ char *remote_ip = rpaf_client_ip(rcr->r->connection); >-+ strcpy(remote_ip,apr_pstrdup(rcr->r->connection->pool, rcr->old_ip)); >-+ rpaf_client_addr(rcr->r->connection)->sa.sin.sin_addr.s_addr = apr_inet_addr(remote_ip); >- return APR_SUCCESS; >- } >- >-@@ -160,8 +178,8 @@ >- >- if (!cfg->enable) >- return DECLINED; >-- >-- if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) { >-+ char *remote_ip = rpaf_client_ip(r->connection); >-+ if (is_in_array(remote_ip, cfg->proxy_ips) == 1) { >- /* check if cfg->headername is set and if it is use >- that instead of X-Forwarded-For by default */ >- if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) { >-@@ -180,11 +198,11 @@ >- if (*fwdvalue != '\0') >- ++fwdvalue; >- } >-- rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip); >-+ rcr->old_ip = apr_pstrdup(r->connection->pool, remote_ip); >- rcr->r = r; >- apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null); >-- r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]); >-- r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip); >-+ strcpy(remote_ip,apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)])); >-+ rpaf_client_addr(r->connection)->sa.sin.sin_addr.s_addr = apr_inet_addr(remote_ip); >- if (cfg->sethostname) { >- const char *hostvalue; >- if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) { > >Property changes on: www/mod_rpaf2/files/patch-mod_rpaf-2.0.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209869
:
170839
|
170952
|
177848
|
177905