From 11fdeed8fb487d0dd6f01c700eb8294689e285d6 Mon Sep 17 00:00:00 2001 From: henri Date: Mon, 22 Apr 2013 19:34:18 +0000 Subject: [PATCH] Restrict proxying to TCP operations. --- nsock/src/nsock_connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nsock/src/nsock_connect.c b/nsock/src/nsock_connect.c index dc8e7889c..8d9c37a3b 100644 --- a/nsock/src/nsock_connect.c +++ b/nsock/src/nsock_connect.c @@ -161,7 +161,9 @@ void nsock_connect_internal(mspool *ms, msevent *nse, int type, int proto, struc #endif msiod *iod = nse->iod; - if (iod->px_ctx && (nse->handler != nsock_proxy_ev_dispatch)) { + if (iod->px_ctx /* proxy enabled */ + && proto == IPPROTO_TCP /* restrict proxying to TCP connections */ + && (nse->handler != nsock_proxy_ev_dispatch)) { /* for reentrancy */ struct proxy_node *current; current = proxy_ctx_node_current(iod->px_ctx);