Author: ajcorrea
Date: Wed Feb 18 20:07:49 2009
New Revision: 13810

Modified:
    branches/LUSCA_HEAD/libiapp/comm_ips_tproxy2.c

Log:
Fixed issue #6
--#This line, and those below, will be ignored--

M    libiapp/comm_ips_tproxy2.c


Modified: branches/LUSCA_HEAD/libiapp/comm_ips_tproxy2.c
==============================================================================
--- branches/LUSCA_HEAD/libiapp/comm_ips_tproxy2.c      (original)
+++ branches/LUSCA_HEAD/libiapp/comm_ips_tproxy2.c      Wed Feb 18 20:07:49 2009
@@ -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;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to