Inet-Admins mailing list archive (inet-admins@info.east.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [inet-admins] Cisco Content Engine
Replying to Victor Sudakov:
> К FreeBSD еще надо сбоку поддержку gre прикручивать.
Linux :)))
> Приму с благодарностью.
diff -urN squid-head-200112240002/src/client_side.c
squid-head-200112240002-stingr/src/client_side.c
--- squid-head-200112240002/src/client_side.c Thu Dec 13 02:44:18 2001
+++ squid-head-200112240002-stingr/src/client_side.c Wed Dec 26 19:52:37 2001
@@ -2571,6 +2571,15 @@
int vport;
char *q;
const char *protocol_name = "http";
+
+#if LINUX_NETFILTER
+ debug(33, 2) ("[stingr] SockDst: %s:%d -> ",
+inet_ntoa(conn->me.sin_addr), ntohs(http->conn->me.sin_port));
+ /* If the call fails the address structure will be unchanged */
+ getsockopt(conn->fd, SOL_IP, SO_ORIGINAL_DST, &conn->me, &sock_sz);
+
+ debug(33, 2) ("%s:%d\n", inet_ntoa(conn->me.sin_addr),
+ntohs(http->conn->me.sin_port));
+#endif
+
if (vport_mode)
vport = (int) ntohs(http->conn->me.sin_port);
else
Ну и для комплекта патч для работы транспарент модуля оопса под линуксом
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/modules/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)i@stingr.net // (http)stingr.net // (pgp)0xA4B4ECA4
=============================================================================
"inet-admins" Internet access mailing list. Maintained by East Connection ISP.
Mail "unsubscribe inet-admins" to Majordomo@info.east.ru if you want to quit.
Archive is accessible on http://info.east.ru/rus/inetadm.html
|