����������.

������ �� ������ - ���� ��� - ugly hack (�� ��, ��� ������, �������� ��
����� :))) )

diff -urN --exclude=CVS --exclude=configure --exclude=acconfig.h --exclude=config.h.in 
oops/configure.in oops-stingr/configure.in
--- oops/configure.in   Tue Dec 25 12:34:58 2001
+++ oops-stingr/configure.in    Thu Jan 17 16:17:58 2002
@@ -52,6 +52,7 @@
 AC_CHECK_HEADERS(crypt.h getopt.h pthread.h stdlib.h string.h strings.h unistd.h 
sys/inttypes.h)
 AC_CHECK_HEADERS(netinet/ip_fil.h, AC_DEFINE(HAVE_IPF))
 AC_CHECK_HEADERS(netinet/ip6.h, AC_DEFINE(HAVE_IP6_H))
+AC_CHECK_HEADERS(linux/netfilter_ipv4.h)
 
 pwd=`pwd`
 LIBDB_NAME=-ldb
diff -urN --exclude=CVS --exclude=configure --exclude=acconfig.h --exclude=config.h.in 
oops/src/modules/transparent.c oops-stingr/src/moodules/transparent.c
--- oops/src/modules/transparent.c      Thu Dec 13 08:09:52 2001
+++ oops-stingr/src/modules/transparent.c       Thu Jan 17 16:21:21 2002
@@ -36,6 +36,10 @@
 int            natfd;
 #endif
 
+#if defined(HAVE_LINUX_NETFILTER_IPV4_H)
+#include <linux/netfilter_ipv4.h>
+#endif
+
 #define        MODULE_NAME     "transparent"
 #define        MODULE_INFO     "Transparent proxy"
 
@@ -204,6 +208,11 @@
        host = attr_value(rq->av_pairs, "host");
     if ( !host ) {
        /* We can try to fetch destination using IPF */
+#if defined(HAVE_LINUX_NETFILTER_IPV4_H)
+       size_t sock_sz = sizeof(&rq->my_sa);
+       
+       getsockopt(rq->so, SOL_IP, SO_ORIGINAL_DST, &rq->my_sa, &sock_sz);
+#endif
 #if    defined(HAVE_IPF)
        struct natlookup natLookup, *natLookupP = &natLookup;
        static int natfd = -1, r;


-- 
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar
  PPKJ1-RIPE // (smtp)[EMAIL PROTECTED] // (http)stingr.net // (pgp)0xA4B4ECA4
=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://lists.paco.net/oops-rus/

Дати відповідь електронним листом