openwrt_archive/net/redir/patches/03_fix_tcp_wrappers.patch
Jo-Philipp Wich 7d7d375df9 New package redir
This patch adds a new package "redir" that allows to redirect incoming
TCP connections to a specific destination in a proxy-like way.


SVN-Revision: 15686
2009-05-07 14:14:59 +00:00

26 lines
751 B
Diff

diff -Nur a/redir.c b/redir.c
--- a/redir.c 2005-10-22 22:10:11.439455392 -0400
+++ b/redir.c 2005-10-22 22:10:51.625346208 -0400
@@ -802,8 +802,8 @@
#ifdef USE_TCP_WRAPPERS
request_init(&request, RQ_DAEMON, ident, RQ_FILE, clisock, 0);
sock_host(&request);
- sock_hostname(&request);
- sock_hostaddr(&request);
+ sock_hostname(request.client);
+ sock_hostaddr(request.client);
if (!hosts_access(&request)) {
refuse(&request);
@@ -1057,8 +1057,8 @@
#ifdef USE_TCP_WRAPPERS
request_init(&request, RQ_DAEMON, ident, RQ_FILE, 0, 0);
sock_host(&request);
- sock_hostname(&request);
- sock_hostaddr(&request);
+ sock_hostname(request.client);
+ sock_hostaddr(request.client);
if (!hosts_access(&request))
refuse(&request);