aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls_hooks.c
diff options
context:
space:
mode:
authorGravatar Dash Shendy 2011-07-08 23:04:16 +0200
committerGravatar Dash Shendy 2011-07-08 23:04:16 +0200
commit60cf11c4c8c984d7fafd369171bfa950eefd3c4f (patch)
treefd08c8ee8fafa75d143273a7e24c0a0b6898e13a /src/gnutls_hooks.c
parentb4a875b12ad2ef07f38ae23b3d3e853b5a59bf89 (diff)
Proxy (TLS termination) patch
Signed-off-by: Dash Shendy <neuromancer@dash.za.net>
Diffstat (limited to 'src/gnutls_hooks.c')
-rw-r--r--src/gnutls_hooks.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c
index 2999aae..4b9e964 100644
--- a/src/gnutls_hooks.c
+++ b/src/gnutls_hooks.c
@@ -738,8 +738,9 @@ int mgs_hook_pre_connection(conn_rec * c, void *csd)
738 738
739 _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__); 739 _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__);
740 740
741 if (c == NULL) 741 if (c == NULL) {
742 return DECLINED; 742 return DECLINED;
743 }
743 744
744 sc = (mgs_srvconf_rec *) ap_get_module_config(c->base_server-> 745 sc = (mgs_srvconf_rec *) ap_get_module_config(c->base_server->
745 module_config, 746 module_config,
@@ -749,10 +750,11 @@ int mgs_hook_pre_connection(conn_rec * c, void *csd)
749 return DECLINED; 750 return DECLINED;
750 } 751 }
751 752
752 if (c->remote_addr->hostname) 753 if (c->remote_addr->hostname || apr_strnatcmp(c->remote_ip,c->local_ip) == 0) {
753 /* Connection initiated by Apache (mod_proxy) => ignore */ 754 /* Connection initiated by Apache (mod_proxy) => ignore */
754 return OK; 755 return OK;
755 756 }
757
756 ctxt = create_gnutls_handle(c->pool, c); 758 ctxt = create_gnutls_handle(c->pool, c);
757 759
758 ap_set_module_config(c->conn_config, &gnutls_module, ctxt); 760 ap_set_module_config(c->conn_config, &gnutls_module, ctxt);