Revision: 14376
Author: adrian.chadd
Date: Sun Dec  6 03:12:34 2009
Log: Modify the non-local freebsd bind code to support both the tproxy  
freebsd 7
support patches and the -current / freebsd-8 option.


http://code.google.com/p/lusca-cache/source/detail?r=14376

Modified:
  /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c

=======================================
--- /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c     Sun Jun 14 06:30:02 2009
+++ /branches/LUSCA_HEAD/libiapp/comm_ips_freebsd.c     Sun Dec  6 03:12:34 2009
@@ -7,6 +7,11 @@

  #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>
@@ -37,7 +42,7 @@
  {
      int on = 1;

-    if (setsockopt(fd, IPPROTO_IP, IP_NONLOCALOK, (char *)&on,  
sizeof(on)) != 0)
+    if (setsockopt(fd, IPPROTO_IP, IP_BINDANY, (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.


Reply via email to