Revision: 14378 Author: adrian.chadd Date: Sat Dec 19 23:16:14 2009 Log: Un-break the build under FreeBSD-7+tproxy patch. The logic for figuring out what was supposed to be defined for tproxy was all busted.
http://code.google.com/p/lusca-cache/source/detail?r=14378 Modified: /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c ======================================= --- /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c Sun Dec 6 03:12:34 2009 +++ /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c Sat Dec 19 23:16:14 2009 @@ -7,11 +7,6 @@ #if FREEBSD_TPROXY -/* IP_NONLOCALOK = old-patch; IP_BINDANY = -current and 8.x */ -#ifndef IP_NONLOCALOK -#define IP_NONLOCALOK IP_BINDANY -#endif - #include <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -24,6 +19,11 @@ #include "comm_types.h" #include "globals.h" +/* IP_NONLOCALOK = old-patch; IP_BINDANY = -current and 8.x */ +#ifndef IP_NONLOCALOK +#define IP_NONLOCALOK IP_BINDANY +#endif + /* * FreeBSD non-local bind listen() sockets bind to the relevant address and use * getsockname() to determine the original destination (local address being spoofed) @@ -42,7 +42,7 @@ { int on = 1; - if (setsockopt(fd, IPPROTO_IP, IP_BINDANY, (char *)&on, sizeof(on)) != 0) + if (setsockopt(fd, IPPROTO_IP, IP_NONLOCALOK, (char *)&on, sizeof(on)) != 0) return COMM_ERROR; if (bind(fd, sqinet_get_entry(a), sqinet_get_length(a)) != 0) return COMM_ERROR; -- 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.
