From 237a4499fa90e1b252961891f9e26653919c2de2 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Sat, 24 Oct 2026 20:34:46 +0300 Subject: [PATCH] ftppr: the data socket towards the client from the socket functions It was made with socket(): in the main network namespace rather than the -ni one the client is reached in, and past the socket functions of the service, which the rest of its life went through. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 7718ffa9f73d200688fbc223a4deff5a5a7e3428) --- src/ftppr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftppr.c b/src/ftppr.c index 486de53..24b904c 100644 --- a/src/ftppr.c +++ b/src/ftppr.c @@ -132,7 +132,7 @@ void * ftpprchild(struct clientparam* param) { param->srv->so._closesocket(param->sostate, clidatasock); clidatasock = INVALID_SOCKET; } - if ((clidatasock=socket(SASOCK(¶m->sincl), SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) {RETURN(821);} + if ((clidatasock=nssocket(param->srv, ¶m->srv->so, param->sostate, NS_IN, SASOCK(¶m->sincl), SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) {RETURN(821);} if(intbindtodevice(param, clidatasock)){RETURN(822);} *SAPORT(¶m->sincl) = 0; if(bindwithrange(param, clidatasock, ¶m->sincl, param->intport)){RETURN(822);}