summaryrefslogtreecommitdiffstatsabout
path: root/src/gnutls_hooks.c
diff options
context:
space:
mode:
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);