Closed GoogleCodeExporter closed 9 years ago
here´s a patch !!
Index: libiapp/comm_ips_tproxy2.c
===================================================================
--- libiapp/comm_ips_tproxy2.c (revision 13809)
+++ libiapp/comm_ips_tproxy2.c (working copy)
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <linux/netfilter_ipv4.h>
#include <linux/netfilter_ipv4/ip_tproxy.h>
@@ -37,16 +38,18 @@
#include <sys/prctl.h>
#endif
+#include "../include/util.h"
+
+
int
comm_ips_bind(int fd, sqaddr_t *a)
{
if (sqinet_get_family(a) != AF_INET)
return COMM_ERROR;
- u_short port = sqinet_get_port(a);
struct in_tproxy itp;
- itp.v.addr.faddr.s_addr = sqinet_get_v4_inaddr(a);
+ itp.v.addr.faddr = sqinet_get_v4_inaddr(a,SQADDR_ASSERT_IS_V4);
/* XXX the "port" is 0 here - so tproxy2 selects an outbound port rather than
also spoofing the port */
itp.v.addr.fport = 0;
Original comment by ajcor...@gmail.com
on 19 Feb 2009 at 4:01
Looks fine! Commit it when you're happy to.
Original comment by adrian.c...@gmail.com
on 19 Feb 2009 at 4:03
Alexandre committed this a while back!
Original comment by adrian.c...@gmail.com
on 13 Apr 2009 at 8:30
Original issue reported on code.google.com by
ajcor...@gmail.com
on 17 Feb 2009 at 10:04