packages/net/redsocks/patches/010-fix-undeclared.diff
florian 4b12de81eb [package] redsocks: add package
Redsocks is a daemon running on the local system, that will transparently
tunnel any TCP connection via a remote SOCKS4, SOCKS5 or HTTP proxy server. It
uses the system firewall's redirection facility to intercept TCP connections,
thus the redirection is system-wide, with fine-grained control, and does
not depend on LD_PRELOAD libraries.

Signed-off-by: Sebastian Muszynski <basti@linkt.de>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@33799 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-10-16 15:55:51 +00:00

29 lines
1.1 KiB
Diff

diff -ur redsocks-0.4.orig/redudp.c redsocks-0.4/redudp.c
--- redsocks-0.4.orig/redudp.c 2012-07-27 20:30:40.283988208 +0200
+++ redsocks-0.4/redudp.c 2012-07-27 20:31:35.759985938 +0200
@@ -33,6 +33,10 @@
#include "redsocks.h"
#include "redudp.h"
+#define IP_ORIGDSTADDR 20
+#define IP_TRANSPARENT 19
+#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
+
#define redudp_log_error(client, prio, msg...) \
redsocks_log_write_plain(__FILE__, __LINE__, __func__, 0, &(client)->clientaddr, get_destaddr(client), prio, ## msg)
#define redudp_log_errno(client, prio, msg...) \
diff -ur redsocks-0.4.orig/utils.c redsocks-0.4/utils.c
--- redsocks-0.4.orig/utils.c 2012-07-27 20:30:40.283988208 +0200
+++ redsocks-0.4/utils.c 2012-07-27 20:31:20.075986580 +0200
@@ -26,6 +26,10 @@
#include "utils.h"
#include "redsocks.h" // for redsocks_close
+#define IP_ORIGDSTADDR 20
+#define IP_TRANSPARENT 19
+#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
+
int red_recv_udp_pkt(int fd, char *buf, size_t buflen, struct sockaddr_in *inaddr, struct sockaddr_in *toaddr)
{
socklen_t addrlen = sizeof(*inaddr);