summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/FWTK
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1999-11-08 20:51:23 +0000
committerguido <guido@FreeBSD.org>1999-11-08 20:51:23 +0000
commit0539756f3d2277bd1ecc19afb014c074426e2f35 (patch)
treedbbb879c93cb0348e4c4fd6a3ef24f80198ce5a1 /contrib/ipfilter/FWTK
parent9529c38ad8859b9f325867d97f266101f2c4dca3 (diff)
downloadFreeBSD-src-0539756f3d2277bd1ecc19afb014c074426e2f35.zip
FreeBSD-src-0539756f3d2277bd1ecc19afb014c074426e2f35.tar.gz
Import of ipfilter 3.3.3 in anticipation of its revival.
More to come in the next days.
Diffstat (limited to 'contrib/ipfilter/FWTK')
-rw-r--r--contrib/ipfilter/FWTK/ftp-gw.diff2
-rw-r--r--contrib/ipfilter/FWTK/fwtk_transparent.diff4
-rw-r--r--contrib/ipfilter/FWTK/tproxy.diff82
3 files changed, 85 insertions, 3 deletions
diff --git a/contrib/ipfilter/FWTK/ftp-gw.diff b/contrib/ipfilter/FWTK/ftp-gw.diff
index 3052eba..be61342 100644
--- a/contrib/ipfilter/FWTK/ftp-gw.diff
+++ b/contrib/ipfilter/FWTK/ftp-gw.diff
@@ -4,7 +4,7 @@
*** 11,31 ****
--- 11,41 ----
*/
- static char RcsId[] = "$Header: /devel/CVS/IP-Filter/FWTK/ftp-gw.diff,v 2.0.2.3 1997/06/22 07:06:02 darrenr Exp $";
+ static char RcsId[] = "$Header: /devel/CVS/IP-Filter/FWTK/ftp-gw.diff,v 2.1 1999/08/04 17:30:30 darrenr Exp $";
+ /*
+ * Patches for IP Filter NAT extensions written by Darren Reed, 7/7/96
diff --git a/contrib/ipfilter/FWTK/fwtk_transparent.diff b/contrib/ipfilter/FWTK/fwtk_transparent.diff
index 6a5c376..69962b6 100644
--- a/contrib/ipfilter/FWTK/fwtk_transparent.diff
+++ b/contrib/ipfilter/FWTK/fwtk_transparent.diff
@@ -124,7 +124,7 @@ diff -cr ../TIS.orig/fwtk/Makefile.config.solaris fwtk/Makefile.config.solaris
***************
*** 11,30 ****
#
- # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.0.2.1 1997/02/23 10:38:36 darrenr Exp $"
+ # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.1 1999/08/04 17:40:48 darrenr Exp $"
# Your C compiler (eg, "cc" or "gcc")
@@ -145,7 +145,7 @@ diff -cr ../TIS.orig/fwtk/Makefile.config.solaris fwtk/Makefile.config.solaris
-Dgethostbyaddr=res_gethostbyaddr -Dgetnetbyname=res_getnetbyname \
--- 11,34 ----
#
- # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.0.2.1 1997/02/23 10:38:36 darrenr Exp $"
+ # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.1 1999/08/04 17:40:48 darrenr Exp $"
+ #
+ # Path to sources of ip_filter (ip_nat.h required in lib/hnam.c)
diff --git a/contrib/ipfilter/FWTK/tproxy.diff b/contrib/ipfilter/FWTK/tproxy.diff
new file mode 100644
index 0000000..234404b
--- /dev/null
+++ b/contrib/ipfilter/FWTK/tproxy.diff
@@ -0,0 +1,82 @@
+*** tproxy.c.orig Fri Dec 20 10:53:24 1996
+--- tproxy.c Sun Jan 3 11:33:55 1999
+***************
+*** 135,140 ****
+--- 135,144 ----
+ #include <netinet/in.h>
+ #include <sys/signal.h>
+ #include <syslog.h>
++ #include <unistd.h>
++ #include <fcntl.h>
++ #include <sys/ioctl.h>
++ #include <net/if.h>
+ #include "tproxy.h"
+
+ #ifdef AIX
+***************
+*** 147,152 ****
+--- 151,159 ----
+ #define bzero(buf,size) memset(buf, '\0', size);
+ #endif /* SYSV */
+
++ #include "ip_compat.h"
++ #include "ip_fil.h"
++ #include "ip_nat.h"
+
+
+ /* socket to audio server */
+***************
+*** 324,329 ****
+--- 331,369 ----
+ char localbuf[2048];
+ void timeout();
+ extern int errno;
++ /*
++ * IP-Filter block
++ */
++ struct sockaddr_in laddr, faddr;
++ struct natlookup natlookup;
++ int slen, natfd;
++
++ bzero((char *)&laddr, sizeof(laddr));
++ bzero((char *)&faddr, sizeof(faddr));
++ slen = sizeof(laddr);
++ if (getsockname(0, (struct sockaddr *)&laddr, &slen) < 0)
++ return -1;
++ slen = sizeof(faddr);
++ if (getpeername(0, (struct sockaddr *)&faddr, &slen) < 0)
++ return -1;
++ natlookup.nl_inport = laddr.sin_port;
++ natlookup.nl_outport = faddr.sin_port;
++ natlookup.nl_inip = laddr.sin_addr;
++ natlookup.nl_outip = faddr.sin_addr;
++ natlookup.nl_flags = IPN_TCP;
++ if ((natfd = open(IPL_NAT, O_RDONLY)) < 0)
++ return -1;
++ if (ioctl(natfd, SIOCGNATL, &natlookup) == -1) {
++ syslog(LOG_ERR, "SIOCGNATL failed: %m\n");
++ close(natfd);
++ return -1;
++ }
++ close(natfd);
++ strcpy(hostname, inet_ntoa(natlookup.nl_realip));
++ serverport = ntohs(natlookup.nl_realport);
++ /*
++ * End of IP-Filter block
++ */
+
+ /* setup a timeout in case dialog doesn't finish */
+ signal(SIGALRM, timeout);
+***************
+*** 337,344 ****
+--- 377,386 ----
+ * and modify the call to (and subroutine) serverconnect() as
+ * appropriate.
+ */
++ #if 0
+ strcpy(hostname, "randomhostname");
+ serverport = 7070;
++ #endif
+ /* Can we connect to the server */
+ if ( (serverfd = serverconnect(hostname, serverport)) < 0 ) {
+ /* errno may still be set from previous call */
OpenPOWER on IntegriCloud