diff -cr ip_fil3.4.18/HISTORY ip_fil3.4.19/HISTORY *** ip_fil3.4.18/HISTORY Tue Jun 5 21:33:32 2001 --- ip_fil3.4.19/HISTORY Fri Jun 29 00:35:00 2001 *************** *** 22,27 **** --- 22,40 ---- # and especially those who have found the time to port IP Filter to new # platforms. # + 3.4.19 29/06/2001 - Released + + fix to support suspend/resume on solaris8 as well as ipv6 + + include group/group-head in match of filter rules + + fix endian problem reading snoop files + + make all licence comments point to the one place + + fix ftp proxy to only advance state if a reply is received in response to + a recognised command + 3.4.18 05/06/2001 - Released fix up parsing of "from ! host" where '!' is separate Only in ip_fil3.4.19: IPFILTER.LICENCE Only in ip_fil3.4.18: LICENCE diff -cr ip_fil3.4.18/Makefile ip_fil3.4.19/Makefile *** ip_fil3.4.18/Makefile Sun May 27 02:59:11 2001 --- ip_fil3.4.19/Makefile Tue Jun 26 20:43:10 2001 *************** *** 1,11 **** # ! # Copyright (C) 1993-2000 by Darren Reed. # ! # Redistribution and use in source and binary forms are permitted ! # provided that this notice is preserved and due credit is given ! # to the original author and the contributors. # ! # $Id: Makefile,v 2.11.2.7 2001/05/26 16:59:11 darrenr Exp $ # BINDEST=/usr/local/bin SBINDEST=/sbin --- 1,9 ---- # ! # Copyright (C) 1993-2001 by Darren Reed. # ! # See the IPFILTER.LICENCE file for details on licencing. # ! # $Id: Makefile,v 2.11.2.8 2001/06/26 10:43:10 darrenr Exp $ # BINDEST=/usr/local/bin SBINDEST=/sbin diff -cr ip_fil3.4.18/SunOS5/pkginfo ip_fil3.4.19/SunOS5/pkginfo *** ip_fil3.4.18/SunOS5/pkginfo Tue Jun 5 21:33:32 2001 --- ip_fil3.4.19/SunOS5/pkginfo Fri Jun 29 00:35:01 2001 *************** *** 5,11 **** PKG=ipf NAME=IP Filter ARCH=ARCH_updated_by_sed_when_package_is_built ! VERSION=3.4.18 CATEGORY=system DESC=This package contains tools for building a firewall VENDOR=Darren Reed --- 5,11 ---- PKG=ipf NAME=IP Filter ARCH=ARCH_updated_by_sed_when_package_is_built ! VERSION=3.4.19 CATEGORY=system DESC=This package contains tools for building a firewall VENDOR=Darren Reed diff -cr ip_fil3.4.18/SunOS5/postinstall ip_fil3.4.19/SunOS5/postinstall *** ip_fil3.4.18/SunOS5/postinstall Sat Jan 29 01:02:40 2000 --- ip_fil3.4.19/SunOS5/postinstall Thu Jun 28 23:53:55 2001 *************** *** 1,5 **** #!/bin/sh ! DEVLINK=${BASEDIR}/etc/devlink.tab PATH=${PATH}:/sbin:/usr/sbin:/usr/ucb if [ x"`grep minor=ipf ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipf \M0" >> ${DEVLINK} --- 1,5 ---- #!/bin/sh ! DEVLINK=${PKG_INSTALL_ROOT}/etc/devlink.tab PATH=${PATH}:/sbin:/usr/sbin:/usr/ucb if [ x"`grep minor=ipf ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipf \M0" >> ${DEVLINK} *************** *** 16,31 **** if [ x"`grep minor=ipauth ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipauth \M0" >> ${DEVLINK} fi ! if [ x${BASEDIR} = x -o x${BASEDIR} = x/ ] ; then add_drv -m '* 0600 root root' ipf else ! add_drv -m '* 0600 root root' -b ${BASEDIR:-/} ipf fi ! /usr/sbin/devlinks -r ${BASEDIR:-/} if [ -d /usr/ucb -a -f /usr/ucb/ucblinks ] ; then ! /usr/ucb/ucblinks -r ${BASEDIR:-/} fi ! if [ ! -f ${BASEDIR}/etc/opt/ipf/ipf.conf ] ; then ! touch ${BASEDIR}/etc/opt/ipf/ipf.conf fi exit 0 --- 16,31 ---- if [ x"`grep minor=ipauth ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipauth \M0" >> ${DEVLINK} fi ! if [ x${PKG_INSTALL_ROOT} = x -o x${PKG_INSTALL_ROOT} = x/ ] ; then add_drv -m '* 0600 root root' ipf else ! add_drv -m '* 0600 root root' -b ${PKG_INSTALL_ROOT:-/} ipf fi ! /usr/sbin/devlinks -r ${PKG_INSTALL_ROOT:-/} if [ -d /usr/ucb -a -f /usr/ucb/ucblinks ] ; then ! /usr/ucb/ucblinks -r ${PKG_INSTALL_ROOT:-/} fi ! if [ ! -f ${PKG_INSTALL_ROOT}/etc/opt/ipf/ipf.conf ] ; then ! touch ${PKG_INSTALL_ROOT}/etc/opt/ipf/ipf.conf fi exit 0 diff -cr ip_fil3.4.18/common.c ip_fil3.4.19/common.c *** ip_fil3.4.18/common.c Wed Apr 4 00:13:34 2001 --- ip_fil3.4.19/common.c Tue Jun 26 20:43:10 2001 *************** *** 1,9 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #if !defined(__SVR4) && !defined(__svr4__) --- 1,7 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #if !defined(__SVR4) && !defined(__svr4__) diff -cr ip_fil3.4.18/facpri.c ip_fil3.4.19/facpri.c *** ip_fil3.4.18/facpri.c Wed Apr 4 00:13:35 2001 --- ip_fil3.4.19/facpri.c Tue Jun 26 20:43:11 2001 *************** *** 1,9 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 19,25 **** #include "facpri.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: facpri.c,v 1.3.2.2 2001/04/03 14:13:35 darrenr Exp $"; #endif typedef struct table { --- 17,23 ---- #include "facpri.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: facpri.c,v 1.3.2.3 2001/06/26 10:43:11 darrenr Exp $"; #endif typedef struct table { diff -cr ip_fil3.4.18/facpri.h ip_fil3.4.19/facpri.h *** ip_fil3.4.18/facpri.h Tue Mar 14 09:10:18 2000 --- ip_fil3.4.19/facpri.h Tue Jun 26 20:43:11 2001 *************** *** 1,10 **** /* ! * Copyright (C) 1999-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. ! * $Id: facpri.h,v 1.3 2000/03/13 22:10:18 darrenr Exp $ */ #ifndef __FACPRI_H__ --- 1,8 ---- /* ! * Copyright (C) 1999-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. ! * $Id: facpri.h,v 1.3.2.1 2001/06/26 10:43:11 darrenr Exp $ */ #ifndef __FACPRI_H__ diff -cr ip_fil3.4.18/fil.c ip_fil3.4.19/fil.c *** ip_fil3.4.18/fil.c Sat May 19 00:20:04 2001 --- ip_fil3.4.19/fil.c Tue Jun 26 20:43:11 2001 *************** *** 1,13 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fil.c,v 2.35.2.34 2001/05/18 14:20:04 darrenr Exp $"; #endif #include --- 1,11 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fil.c,v 2.35.2.35 2001/06/26 10:43:11 darrenr Exp $"; #endif #include *************** *** 1460,1466 **** * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 ! * $Id: fil.c,v 2.35.2.34 2001/05/18 14:20:04 darrenr Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, --- 1458,1464 ---- * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 ! * $Id: fil.c,v 2.35.2.35 2001/06/26 10:43:11 darrenr Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, diff -cr ip_fil3.4.18/fils.c ip_fil3.4.19/fils.c *** ip_fil3.4.18/fils.c Fri Jun 1 22:52:08 2001 --- ip_fil3.4.19/fils.c Thu Jun 28 23:52:59 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version *************** *** 76,85 **** #if !defined(lint) static const char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fils.c,v 2.21.2.11 2001/06/01 12:52:08 darrenr Exp $"; #endif extern char *optarg; #define PRINTF (void)printf #define FPRINTF (void)fprintf --- 74,84 ---- #if !defined(lint) static const char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fils.c,v 2.21.2.13 2001/06/28 13:52:59 darrenr Exp $"; #endif extern char *optarg; + extern int optind; #define PRINTF (void)printf #define FPRINTF (void)fprintf *************** *** 253,259 **** #if SOLARIS while ((c = getopt(argc, argv, "6aACfghIilnoqstvd:D:M:N:P:S:T:")) != -1) #else ! while ((c = getopt(argc, argv, "6aACfghIilnoqstvd:D:M:P:S:T:")) != -1) #endif { switch (c) --- 252,258 ---- #if SOLARIS while ((c = getopt(argc, argv, "6aACfghIilnoqstvd:D:M:N:P:S:T:")) != -1) #else ! while ((c = getopt(argc, argv, "6aACfghIilnostvd:D:M:P:S:T:")) != -1) #endif { switch (c) *************** *** 316,330 **** exit(-2); } break; - case 'q' : #if SOLARIS showqiflist(kern); exit(0); - #else - fprintf(stderr, "option 'q' not supported\n"); - exit(1); - #endif break; case 's' : opts |= OPT_IPSTATES; break; --- 315,326 ---- exit(-2); } break; #if SOLARIS + case 'q' : showqiflist(kern); exit(0); break; + #endif case 's' : opts |= OPT_IPSTATES; break; diff -cr ip_fil3.4.18/ip_auth.c ip_fil3.4.19/ip_auth.c *** ip_fil3.4.18/ip_auth.c Sat Apr 21 13:00:33 2001 --- ip_fil3.4.19/ip_auth.c Tue Jun 26 20:43:12 2001 *************** *** 1,12 **** /* * Copyright (C) 1998-2001 by Darren Reed & Guido van Rooij. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.11.2.9 2001/04/21 03:00:33 darrenr Exp $"; #endif #include --- 1,10 ---- /* * Copyright (C) 1998-2001 by Darren Reed & Guido van Rooij. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.11.2.10 2001/06/26 10:43:12 darrenr Exp $"; #endif #include diff -cr ip_fil3.4.18/ip_auth.h ip_fil3.4.19/ip_auth.h *** ip_fil3.4.18/ip_auth.h Fri Oct 20 02:38:44 2000 --- ip_fil3.4.19/ip_auth.h Tue Jun 26 20:43:13 2001 *************** *** 1,11 **** /* ! * Copyright (C) 1997-2000 by Darren Reed & Guido Van Rooij. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * ! * $Id: ip_auth.h,v 2.3.2.2 2000/10/19 15:38:44 darrenr Exp $ * */ #ifndef __IP_AUTH_H__ --- 1,9 ---- /* ! * Copyright (C) 1997-2001 by Darren Reed & Guido Van Rooij. * ! * See the IPFILTER.LICENCE file for details on licencing. * ! * $Id: ip_auth.h,v 2.3.2.3 2001/06/26 10:43:13 darrenr Exp $ * */ #ifndef __IP_AUTH_H__ diff -cr ip_fil3.4.18/ip_compat.h ip_fil3.4.19/ip_compat.h *** ip_fil3.4.18/ip_compat.h Sat May 19 00:21:06 2001 --- ip_fil3.4.19/ip_compat.h Tue Jun 26 20:43:13 2001 *************** *** 1,12 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ip_compat.h 1.8 1/14/96 ! * $Id: ip_compat.h,v 2.26.2.14 2001/05/18 14:21:06 darrenr Exp $ */ #ifndef __IP_COMPAT_H__ --- 1,10 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_compat.h 1.8 1/14/96 ! * $Id: ip_compat.h,v 2.26.2.15 2001/06/26 10:43:13 darrenr Exp $ */ #ifndef __IP_COMPAT_H__ diff -cr ip_fil3.4.18/ip_fil.c ip_fil3.4.19/ip_fil.c *** ip_fil3.4.18/ip_fil.c Fri Jun 1 23:09:43 2001 --- ip_fil3.4.19/ip_fil.c Tue Jun 26 20:41:21 2001 *************** *** 1,13 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.28 2001/06/01 13:09:43 darrenr Exp $"; #endif #ifndef SOLARIS --- 1,11 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.30 2001/06/26 10:41:21 darrenr Exp $"; #endif #ifndef SOLARIS *************** *** 1328,1333 **** --- 1326,1355 ---- struct sockaddr_in *dst; struct route iproute; frentry_t *fr; + + #ifdef M_WRITABLE + /* + * HOT FIX/KLUDGE: + * + * If the mbuf we're about to send is not writable (because of + * a cluster reference, for example) we'll need to make a copy + * of it since this routine modifies the contents. + * + * If you have non-crappy network hardware that can transmit data + * from the mbuf, rather than making a copy, this is gonna be a + * problem. + */ + if (M_WRITABLE(m) == 0) { + if ((m0 = m_dup(m, M_DONTWAIT)) != 0) { + m_freem(m); + m = m0; + } else { + error = ENOBUFS; + m_freem(m); + ipl_frouteok[1]++; + } + } + #endif hlen = fin->fin_hlen; ip = mtod(m0, struct ip *); diff -cr ip_fil3.4.18/ip_fil.h ip_fil3.4.19/ip_fil.h *** ip_fil3.4.18/ip_fil.h Thu May 24 22:34:25 2001 --- ip_fil3.4.19/ip_fil.h Tue Jun 26 20:41:32 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ip_fil.h 1.35 6/5/96 ! * $Id: ip_fil.h,v 2.29.2.7 2001/05/24 12:34:25 darrenr Exp $ */ #ifndef __IP_FIL_H__ --- 1,10 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_fil.h 1.35 6/5/96 ! * $Id: ip_fil.h,v 2.29.2.8 2001/06/26 10:41:32 darrenr Exp $ */ #ifndef __IP_FIL_H__ *************** *** 194,201 **** typedef struct frentry { struct frentry *fr_next; - u_32_t fr_group; /* group to which this rule belongs */ - u_32_t fr_grhead; /* group # which this rule starts */ struct frentry *fr_grp; int fr_ref; /* reference count - for grouping */ void *fr_ifa; --- 192,197 ---- *************** *** 219,224 **** --- 215,222 ---- u_short fr_icmp; frtuc_t fr_tuc; + u_32_t fr_group; /* group to which this rule belongs */ + u_32_t fr_grhead; /* group # which this rule starts */ u_32_t fr_flags; /* per-rule flags && options (see below) */ u_int fr_skip; /* # of rules to skip */ u_int fr_loglevel; /* syslog log facility + priority */ diff -cr ip_fil3.4.18/ip_frag.c ip_fil3.4.19/ip_frag.c *** ip_fil3.4.18/ip_frag.c Sat May 19 00:21:48 2001 --- ip_fil3.4.19/ip_frag.c Tue Jun 26 20:43:13 2001 *************** *** 1,13 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_frag.c,v 2.10.2.11 2001/05/18 14:21:48 darrenr Exp $"; #endif #if defined(KERNEL) && !defined(_KERNEL) --- 1,11 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_frag.c,v 2.10.2.12 2001/06/26 10:43:13 darrenr Exp $"; #endif #if defined(KERNEL) && !defined(_KERNEL) diff -cr ip_fil3.4.18/ip_frag.h ip_fil3.4.19/ip_frag.h *** ip_fil3.4.18/ip_frag.h Sat Apr 21 12:56:42 2001 --- ip_fil3.4.19/ip_frag.h Tue Jun 26 20:43:13 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ip_frag.h 1.5 3/24/96 ! * $Id: ip_frag.h,v 2.4.2.4 2001/04/21 02:56:42 darrenr Exp $ */ #ifndef __IP_FRAG_H__ --- 1,10 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_frag.h 1.5 3/24/96 ! * $Id: ip_frag.h,v 2.4.2.5 2001/06/26 10:43:13 darrenr Exp $ */ #ifndef __IP_FRAG_H__ diff -cr ip_fil3.4.18/ip_ftp_pxy.c ip_fil3.4.19/ip_ftp_pxy.c *** ip_fil3.4.18/ip_ftp_pxy.c Sat Jun 2 03:44:05 2001 --- ip_fil3.4.19/ip_ftp_pxy.c Thu Jun 14 17:37:17 2001 *************** *** 2,8 **** * Simple FTP transparent proxy for in-kernel use. For use with the NAT * code. * ! * $Id: ip_ftp_pxy.c,v 2.7.2.24 2001/06/01 17:44:05 darrenr Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; --- 2,8 ---- * Simple FTP transparent proxy for in-kernel use. For use with the NAT * code. * ! * $Id: ip_ftp_pxy.c,v 2.7.2.25 2001/06/14 07:37:17 darrenr Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; *************** *** 315,340 **** } cmd[i] = '\0'; if (!strncmp(cmd, "USER ", 5) || !strncmp(cmd, "XAUT ", 5)) { if (ftp->ftp_passok == FTPXY_ADOK_1 || ! ftp->ftp_passok == FTPXY_AUOK_1) ! ftp->ftp_passok = FTPXY_USER_2; ! else ! ftp->ftp_passok = FTPXY_USER_1; ! } else if (!strncmp(cmd, "AUTH ", 5)) ftp->ftp_passok = FTPXY_AUTH_1; ! else if (!strncmp(cmd, "PASS ", 5)) { ! if (ftp->ftp_passok == FTPXY_USOK_1) ftp->ftp_passok = FTPXY_PASS_1; ! else if (ftp->ftp_passok == FTPXY_USOK_2) ftp->ftp_passok = FTPXY_PASS_2; } else if ((ftp->ftp_passok == FTPXY_AUOK_1) && ! !strncmp(cmd, "ADAT ", 5)) ftp->ftp_passok = FTPXY_ADAT_1; ! else if ((ftp->ftp_passok == FTPXY_PAOK_2) && ! !strncmp(cmd, "ACCT ", 5)) ftp->ftp_passok = FTPXY_ACCT_1; ! else if ((ftp->ftp_passok == FTPXY_GO) && !ippr_ftp_pasvonly && !strncmp(cmd, "PORT ", 5)) { inc = ippr_ftp_port(fin, ip, nat, f, dlen); } else if (ippr_ftp_insecure && !ippr_ftp_pasvonly && --- 315,350 ---- } cmd[i] = '\0'; + ftp->ftp_incok = 0; if (!strncmp(cmd, "USER ", 5) || !strncmp(cmd, "XAUT ", 5)) { if (ftp->ftp_passok == FTPXY_ADOK_1 || ! ftp->ftp_passok == FTPXY_AUOK_1) { ! ftp->ftp_passok = FTPXY_USER_2; ! ftp->ftp_incok = 1; ! } else { ! ftp->ftp_passok = FTPXY_USER_1; ! ftp->ftp_incok = 1; ! } ! } else if (!strncmp(cmd, "AUTH ", 5)) { ftp->ftp_passok = FTPXY_AUTH_1; ! ftp->ftp_incok = 1; ! } else if (!strncmp(cmd, "PASS ", 5)) { ! if (ftp->ftp_passok == FTPXY_USOK_1) { ftp->ftp_passok = FTPXY_PASS_1; ! ftp->ftp_incok = 1; ! } else if (ftp->ftp_passok == FTPXY_USOK_2) { ftp->ftp_passok = FTPXY_PASS_2; + ftp->ftp_incok = 1; + } } else if ((ftp->ftp_passok == FTPXY_AUOK_1) && ! !strncmp(cmd, "ADAT ", 5)) { ftp->ftp_passok = FTPXY_ADAT_1; ! ftp->ftp_incok = 1; ! } else if ((ftp->ftp_passok == FTPXY_PAOK_2) && ! !strncmp(cmd, "ACCT ", 5)) { ftp->ftp_passok = FTPXY_ACCT_1; ! ftp->ftp_incok = 1; ! } else if ((ftp->ftp_passok == FTPXY_GO) && !ippr_ftp_pasvonly && !strncmp(cmd, "PORT ", 5)) { inc = ippr_ftp_port(fin, ip, nat, f, dlen); } else if (ippr_ftp_insecure && !ippr_ftp_pasvonly && *************** *** 365,376 **** int inc; char *s; /* * Check for PASV reply message. */ if (dlen < IPF_MIN227LEN) return 0; ! else if (strncmp(f->ftps_rptr, "227 Entering Passive Mod", 24)) return 0; tcp = (tcphdr_t *)fin->fin_dp; --- 375,387 ---- int inc; char *s; + #define PASV_REPLEN 24 /* * Check for PASV reply message. */ if (dlen < IPF_MIN227LEN) return 0; ! else if (strncmp(f->ftps_rptr, "227 Entering Passive Mod", PASV_REPLEN)) return 0; tcp = (tcphdr_t *)fin->fin_dp; *************** *** 378,384 **** /* * Skip the PORT command + space */ ! s = f->ftps_rptr + 25; while (*s && !isdigit(*s)) s++; /* --- 389,395 ---- /* * Skip the PORT command + space */ ! s = f->ftps_rptr + PASV_REPLEN; while (*s && !isdigit(*s)) s++; /* *************** *** 556,581 **** inc = ippr_ftp_pasv(fin, ip, nat, f, dlen); } else if (*rptr == '5' || *rptr == '4') ftp->ftp_passok = FTPXY_INIT; ! else if (*rptr == '3') { ! if (ftp->ftp_passok == FTPXY_ACCT_1) ! ftp->ftp_passok = FTPXY_GO; ! else ! ftp->ftp_passok++; ! } else if (*rptr == '2') { ! switch (ftp->ftp_passok) ! { ! case FTPXY_USER_1 : ! case FTPXY_USER_2 : ! case FTPXY_PASS_1 : ! case FTPXY_PASS_2 : ! case FTPXY_ACCT_1 : ! ftp->ftp_passok = FTPXY_GO; ! break; ! default : ! ftp->ftp_passok += 3; ! break; } } while ((*rptr++ != '\n') && (rptr < wptr)) ; f->ftps_rptr = rptr; --- 567,595 ---- inc = ippr_ftp_pasv(fin, ip, nat, f, dlen); } else if (*rptr == '5' || *rptr == '4') ftp->ftp_passok = FTPXY_INIT; ! else if (ftp->ftp_incok) { ! if (*rptr == '3') { ! if (ftp->ftp_passok == FTPXY_ACCT_1) ! ftp->ftp_passok = FTPXY_GO; ! else ! ftp->ftp_passok++; ! } else if (*rptr == '2') { ! switch (ftp->ftp_passok) ! { ! case FTPXY_USER_1 : ! case FTPXY_USER_2 : ! case FTPXY_PASS_1 : ! case FTPXY_PASS_2 : ! case FTPXY_ACCT_1 : ! ftp->ftp_passok = FTPXY_GO; ! break; ! default : ! ftp->ftp_passok += 3; ! break; ! } } } + ftp->ftp_incok = 0; while ((*rptr++ != '\n') && (rptr < wptr)) ; f->ftps_rptr = rptr; diff -cr ip_fil3.4.18/ip_lfil.c ip_fil3.4.19/ip_lfil.c *** ip_fil3.4.18/ip_lfil.c Tue Mar 14 09:10:21 2000 --- ip_fil3.4.19/ip_lfil.c Tue Jun 26 20:43:13 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_lfil.c,v 2.6 2000/03/13 22:10:21 darrenr Exp $"; #endif #if defined(KERNEL) && !defined(_KERNEL) --- 1,10 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_lfil.c,v 2.6.2.1 2001/06/26 10:43:13 darrenr Exp $"; #endif #if defined(KERNEL) && !defined(_KERNEL) diff -cr ip_fil3.4.18/ip_log.c ip_fil3.4.19/ip_log.c *** ip_fil3.4.18/ip_log.c Sun Apr 15 16:46:33 2001 --- ip_fil3.4.19/ip_log.c Tue Jun 26 20:43:14 2001 *************** *** 1,11 **** /* * Copyright (C) 1997-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * ! * $Id: ip_log.c,v 2.5.2.4 2001/04/15 06:46:33 darrenr Exp $ */ #include #if defined(KERNEL) && !defined(_KERNEL) --- 1,9 ---- /* * Copyright (C) 1997-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * ! * $Id: ip_log.c,v 2.5.2.5 2001/06/26 10:43:14 darrenr Exp $ */ #include #if defined(KERNEL) && !defined(_KERNEL) diff -cr ip_fil3.4.18/ip_nat.c ip_fil3.4.19/ip_nat.c *** ip_fil3.4.18/ip_nat.c Tue Jun 5 21:29:27 2001 --- ip_fil3.4.19/ip_nat.c Tue Jun 26 20:43:14 2001 *************** *** 1,15 **** /* * Copyright (C) 1995-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * Added redirect stuff and a LOT of bug fixes. (mcn@EnGarde.com) */ #if !defined(lint) static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.37.2.40 2001/06/05 11:29:27 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) --- 1,13 ---- /* * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * Added redirect stuff and a LOT of bug fixes. (mcn@EnGarde.com) */ #if !defined(lint) static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.37.2.41 2001/06/26 10:43:14 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) diff -cr ip_fil3.4.18/ip_nat.h ip_fil3.4.19/ip_nat.h *** ip_fil3.4.18/ip_nat.h Thu May 31 20:25:38 2001 --- ip_fil3.4.19/ip_nat.h Tue Jun 26 20:43:15 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1995-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ip_nat.h 1.5 2/4/96 ! * $Id: ip_nat.h,v 2.17.2.19 2001/05/31 10:25:38 darrenr Exp $ */ #ifndef __IP_NAT_H__ --- 1,10 ---- /* ! * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_nat.h 1.5 2/4/96 ! * $Id: ip_nat.h,v 2.17.2.20 2001/06/26 10:43:15 darrenr Exp $ */ #ifndef __IP_NAT_H__ diff -cr ip_fil3.4.18/ip_proxy.c ip_fil3.4.19/ip_proxy.c *** ip_fil3.4.18/ip_proxy.c Fri Jun 1 23:07:04 2001 --- ip_fil3.4.19/ip_proxy.c Tue Jun 26 20:43:16 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1997-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.9.2.4 2001/06/01 13:07:04 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) --- 1,10 ---- /* ! * Copyright (C) 1997-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.9.2.5 2001/06/26 10:43:16 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) diff -cr ip_fil3.4.18/ip_proxy.h ip_fil3.4.19/ip_proxy.h *** ip_fil3.4.18/ip_proxy.h Thu May 24 22:44:17 2001 --- ip_fil3.4.19/ip_proxy.h Tue Jun 26 20:43:16 2001 *************** *** 1,11 **** /* ! * Copyright (C) 1997-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * ! * $Id: ip_proxy.h,v 2.8.2.5 2001/05/24 12:44:17 darrenr Exp $ */ #ifndef __IP_PROXY_H__ --- 1,9 ---- /* ! * Copyright (C) 1997-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * ! * $Id: ip_proxy.h,v 2.8.2.7 2001/06/26 10:43:16 darrenr Exp $ */ #ifndef __IP_PROXY_H__ *************** *** 103,108 **** --- 101,107 ---- typedef struct ftpinfo { int ftp_passok; + int ftp_incok; ftpside_t ftp_side[2]; } ftpinfo_t; diff -cr ip_fil3.4.18/ip_sfil.c ip_fil3.4.19/ip_sfil.c *** ip_fil3.4.18/ip_sfil.c Sun Nov 12 22:55:17 2000 --- ip_fil3.4.19/ip_sfil.c Tue Jun 26 20:43:16 2001 *************** *** 1,15 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * I hate legaleese, don't you ? */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_sfil.c,v 2.23.2.9 2000/11/12 11:55:17 darrenr Exp $"; #endif #include --- 1,13 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * I hate legaleese, don't you ? */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_sfil.c,v 2.23.2.10 2001/06/26 10:43:16 darrenr Exp $"; #endif #include diff -cr ip_fil3.4.18/ip_state.c ip_fil3.4.19/ip_state.c *** ip_fil3.4.18/ip_state.c Tue Jun 5 21:31:53 2001 --- ip_fil3.4.19/ip_state.c Tue Jun 26 20:43:16 2001 *************** *** 1,13 **** /* * Copyright (C) 1995-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_state.c,v 2.30.2.33 2001/06/05 11:31:53 darrenr Exp $"; #endif #include --- 1,11 ---- /* * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_state.c,v 2.30.2.35 2001/06/26 10:43:16 darrenr Exp $"; #endif #include *************** *** 822,829 **** flags = is->is_flags; sp = tcp->th_sport; dp = tcp->th_dport; ! if (!rev && (sp != is->is_sport)) ! rev = 1; } else { flags = is->is_flags & FI_WILDA; sp = 0; --- 820,831 ---- flags = is->is_flags; sp = tcp->th_sport; dp = tcp->th_dport; ! if (!rev) { ! if (!(flags & FI_W_SPORT) && (sp != is->is_sport)) ! rev = 1; ! else if (!(flags & FI_W_DPORT) && (dp != is->is_dport)) ! rev = 1; ! } } else { flags = is->is_flags & FI_WILDA; sp = 0; diff -cr ip_fil3.4.18/ip_state.h ip_fil3.4.19/ip_state.h *** ip_fil3.4.18/ip_state.h Thu May 31 20:20:12 2001 --- ip_fil3.4.19/ip_state.h Tue Jun 26 20:43:17 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1995-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed ! * $Id: ip_state.h,v 2.13.2.3 2001/05/31 10:20:12 darrenr Exp $ */ #ifndef __IP_STATE_H__ #define __IP_STATE_H__ --- 1,10 ---- /* ! * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed ! * $Id: ip_state.h,v 2.13.2.4 2001/06/26 10:43:17 darrenr Exp $ */ #ifndef __IP_STATE_H__ #define __IP_STATE_H__ diff -cr ip_fil3.4.18/ipf.c ip_fil3.4.19/ipf.c *** ip_fil3.4.18/ipf.c Thu May 31 20:21:19 2001 --- ip_fil3.4.19/ipf.c Thu Jun 28 23:53:31 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version *************** *** 49,55 **** #if !defined(lint) static const char sccsid[] = "@(#)ipf.c 1.23 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipf.c,v 2.10.2.7 2001/05/31 10:21:19 darrenr Exp $"; #endif #if SOLARIS --- 47,53 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipf.c 1.23 6/5/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipf.c,v 2.10.2.9 2001/06/28 13:53:31 darrenr Exp $"; #endif #if SOLARIS *************** *** 92,98 **** static void usage() { ! fprintf(stderr, "usage: ipf %s %s %s %s\n", OPTS, "[-l block|pass|nomatch]", "[-F i|o|a|s|S]", "[-f filename]"); exit(1); } --- 90,96 ---- static void usage() { ! fprintf(stderr, "usage: ipf [-%s] %s %s %s\n", OPTS, "[-l block|pass|nomatch]", "[-F i|o|a|s|S]", "[-f filename]"); exit(1); } diff -cr ip_fil3.4.18/ipf.h ip_fil3.4.19/ipf.h *** ip_fil3.4.18/ipf.h Sat May 6 21:20:20 2000 --- ip_fil3.4.19/ipf.h Tue Jun 26 20:43:18 2001 *************** *** 1,12 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ipf.h 1.12 6/5/96 ! * $Id: ipf.h,v 2.9.2.2 2000/05/06 11:20:20 darrenr Exp $ */ #ifndef __IPF_H__ --- 1,10 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ipf.h 1.12 6/5/96 ! * $Id: ipf.h,v 2.9.2.3 2001/06/26 10:43:18 darrenr Exp $ */ #ifndef __IPF_H__ diff -cr ip_fil3.4.18/ipfs.c ip_fil3.4.19/ipfs.c *** ip_fil3.4.18/ipfs.c Sun Apr 15 16:46:33 2001 --- ip_fil3.4.19/ipfs.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* * Copyright (C) 1999-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version --- 1,7 ---- /* * Copyright (C) 1999-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version *************** *** 47,53 **** #include "ipf.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipfs.c,v 2.6.2.6 2001/04/15 06:46:33 darrenr Exp $"; #endif #ifndef IPF_SAVEDIR --- 45,51 ---- #include "ipf.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipfs.c,v 2.6.2.7 2001/06/26 10:43:18 darrenr Exp $"; #endif #ifndef IPF_SAVEDIR diff -cr ip_fil3.4.18/ipft_ef.c ip_fil3.4.19/ipft_ef.c *** ip_fil3.4.18/ipft_ef.c Tue Mar 14 09:10:24 2000 --- ip_fil3.4.19/ipft_ef.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* *************** *** 51,57 **** #if !defined(lint) static const char sccsid[] = "@(#)ipft_ef.c 1.6 2/4/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_ef.c,v 2.2 2000/03/13 22:10:24 darrenr Exp $"; #endif static int etherf_open __P((char *)); --- 49,55 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipft_ef.c 1.6 2/4/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_ef.c,v 2.2.2.1 2001/06/26 10:43:18 darrenr Exp $"; #endif static int etherf_open __P((char *)); diff -cr ip_fil3.4.18/ipft_hx.c ip_fil3.4.19/ipft_hx.c *** ip_fil3.4.18/ipft_hx.c Tue Mar 14 09:10:24 2000 --- ip_fil3.4.19/ipft_hx.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1995-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* ! * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 42,48 **** #if !defined(lint) static const char sccsid[] = "@(#)ipft_hx.c 1.1 3/9/96 (C) 1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_hx.c,v 2.2 2000/03/13 22:10:24 darrenr Exp $"; #endif extern int opts; --- 40,46 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipft_hx.c 1.1 3/9/96 (C) 1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_hx.c,v 2.2.2.1 2001/06/26 10:43:18 darrenr Exp $"; #endif extern int opts; diff -cr ip_fil3.4.18/ipft_pc.c ip_fil3.4.19/ipft_pc.c *** ip_fil3.4.18/ipft_pc.c Thu May 31 20:21:45 2001 --- ip_fil3.4.19/ipft_pc.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 33,39 **** #include "ipt.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipft_pc.c,v 2.2.2.1 2001/05/31 10:21:45 darrenr Exp $"; #endif struct llc { --- 31,37 ---- #include "ipt.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipft_pc.c,v 2.2.2.2 2001/06/26 10:43:18 darrenr Exp $"; #endif struct llc { diff -cr ip_fil3.4.18/ipft_sn.c ip_fil3.4.19/ipft_sn.c *** ip_fil3.4.18/ipft_sn.c Tue Mar 14 09:10:24 2000 --- ip_fil3.4.19/ipft_sn.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* *************** *** 37,43 **** #include "ipt.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipft_sn.c,v 2.2 2000/03/13 22:10:24 darrenr Exp $"; #endif struct llc { --- 35,41 ---- #include "ipt.h" #if !defined(lint) ! static const char rcsid[] = "@(#)$Id: ipft_sn.c,v 2.2.2.2 2001/06/26 10:43:18 darrenr Exp $"; #endif struct llc { *************** *** 78,83 **** --- 76,82 ---- { struct snoophdr sh; int fd; + int s_v; if (sfd != -1) return sfd; *************** *** 90,105 **** if (read(fd, (char *)&sh, sizeof(sh)) != sizeof(sh)) return -2; ! if (sh.s_v != SNOOP_VERSION || ! sh.s_type < 0 || sh.s_type > SDL_MAX) { (void) close(fd); return -2; } sfd = fd; - s_type = sh.s_type; printf("opened snoop file %s:\n", fname); ! printf("\tid: %8.8s version: %d type: %d\n", sh.s_id, sh.s_v, s_type); return fd; } --- 89,106 ---- if (read(fd, (char *)&sh, sizeof(sh)) != sizeof(sh)) return -2; ! s_v = (int)ntohl(sh.s_v); ! s_type = (int)ntohl(sh.s_type); ! ! if (s_v != SNOOP_VERSION || ! s_type < 0 || s_type > SDL_MAX) { (void) close(fd); return -2; } sfd = fd; printf("opened snoop file %s:\n", fname); ! printf("\tid: %8.8s version: %d type: %d\n", sh.s_id, s_v, s_type); return fd; } *************** *** 118,137 **** static int snoop_read_rec(rec) struct snooppkt *rec; { ! int n, p; if (read(sfd, (char *)rec, sizeof(*rec)) != sizeof(*rec)) return -2; ! if (rec->sp_ilen > rec->sp_plen || rec->sp_plen < sizeof(*rec)) return -2; ! p = rec->sp_plen - sizeof(*rec); ! n = MIN(p, rec->sp_ilen); if (!n || n < 0) return -3; ! return p; } --- 119,140 ---- static int snoop_read_rec(rec) struct snooppkt *rec; { ! int n, plen, ilen; if (read(sfd, (char *)rec, sizeof(*rec)) != sizeof(*rec)) return -2; ! ilen = (int)ntohl(rec->sp_ilen); ! plen = (int)ntohl(rec->sp_plen); ! if (ilen > plen || plen < sizeof(*rec)) return -2; ! plen -= sizeof(*rec); ! n = MIN(plen, ilen); if (!n || n < 0) return -3; ! return plen; } diff -cr ip_fil3.4.18/ipft_td.c ip_fil3.4.19/ipft_td.c *** ip_fil3.4.18/ipft_td.c Tue Mar 14 09:10:24 2000 --- ip_fil3.4.19/ipft_td.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* *************** *** 60,66 **** #if !defined(lint) static const char sccsid[] = "@(#)ipft_td.c 1.8 2/4/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_td.c,v 2.2 2000/03/13 22:10:24 darrenr Exp $"; #endif static int tcpd_open __P((char *)); --- 58,64 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipft_td.c 1.8 2/4/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_td.c,v 2.2.2.1 2001/06/26 10:43:18 darrenr Exp $"; #endif static int tcpd_open __P((char *)); diff -cr ip_fil3.4.18/ipft_tx.c ip_fil3.4.19/ipft_tx.c *** ip_fil3.4.18/ipft_tx.c Wed Apr 4 00:14:09 2001 --- ip_fil3.4.19/ipft_tx.c Tue Jun 26 20:43:18 2001 *************** *** 1,9 **** /* * Copyright (C) 1995-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * Copyright (C) 1995-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 43,49 **** #if !defined(lint) static const char sccsid[] = "@(#)ipft_tx.c 1.7 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_tx.c,v 2.3.2.3 2001/04/03 14:14:09 darrenr Exp $"; #endif extern int opts; --- 41,47 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipft_tx.c 1.7 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipft_tx.c,v 2.3.2.4 2001/06/26 10:43:18 darrenr Exp $"; #endif extern int opts; diff -cr ip_fil3.4.18/ipl.h ip_fil3.4.19/ipl.h *** ip_fil3.4.18/ipl.h Tue Jun 5 21:33:32 2001 --- ip_fil3.4.19/ipl.h Fri Jun 29 00:35:00 2001 *************** *** 1,17 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)ipl.h 1.21 6/5/96 ! * $Id: ipl.h,v 2.15.2.20 2001/06/05 11:33:32 darrenr Exp $ */ #ifndef __IPL_H__ #define __IPL_H__ ! #define IPL_VERSION "IP Filter: v3.4.18" #endif --- 1,15 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)ipl.h 1.21 6/5/96 ! * $Id: ipl.h,v 2.15.2.22 2001/06/28 14:35:00 darrenr Exp $ */ #ifndef __IPL_H__ #define __IPL_H__ ! #define IPL_VERSION "IP Filter: v3.4.19" #endif diff -cr ip_fil3.4.18/iplang/iplang.h ip_fil3.4.19/iplang/iplang.h *** ip_fil3.4.18/iplang/iplang.h Sun Aug 1 20:57:12 1999 --- ip_fil3.4.19/iplang/iplang.h Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * Copyright (C) 1997-1998 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ typedef struct iface { int if_MTU; --- 1,7 ---- /* * Copyright (C) 1997-1998 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ typedef struct iface { int if_MTU; diff -cr ip_fil3.4.18/ipmon.c ip_fil3.4.19/ipmon.c *** ip_fil3.4.18/ipmon.c Thu May 31 20:21:58 2001 --- ip_fil3.4.19/ipmon.c Tue Jun 26 20:43:18 2001 *************** *** 1,13 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ipmon.c 1.21 6/5/96 (C)1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipmon.c,v 2.12.2.10 2001/05/31 10:21:58 darrenr Exp $"; #endif #ifndef SOLARIS --- 1,11 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ipmon.c 1.21 6/5/96 (C)1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipmon.c,v 2.12.2.11 2001/06/26 10:43:18 darrenr Exp $"; #endif #ifndef SOLARIS diff -cr ip_fil3.4.18/ipnat.c ip_fil3.4.19/ipnat.c *** ip_fil3.4.18/ipnat.c Thu May 31 20:29:33 2001 --- ip_fil3.4.19/ipnat.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com) */ --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com) */ *************** *** 57,63 **** #if !defined(lint) static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipnat.c,v 2.16.2.7 2001/05/31 10:29:33 darrenr Exp $"; #endif --- 55,61 ---- #if !defined(lint) static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipnat.c,v 2.16.2.8 2001/06/26 10:43:19 darrenr Exp $"; #endif diff -cr ip_fil3.4.18/ipsd/ipsd.c ip_fil3.4.19/ipsd/ipsd.c *** ip_fil3.4.18/ipsd/ipsd.c Thu Aug 5 03:30:56 1999 --- ip_fil3.4.19/ipsd/ipsd.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1995-1998 Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. --- 1,7 ---- /* * (C)opyright 1995-1998 Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. *************** *** 37,43 **** #ifndef lint static const char sccsid[] = "@(#)ipsd.c 1.3 12/3/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsd.c,v 2.1 1999/08/04 17:30:56 darrenr Exp $"; #endif extern char *optarg; --- 35,41 ---- #ifndef lint static const char sccsid[] = "@(#)ipsd.c 1.3 12/3/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsd.c,v 2.1.4.1 2001/06/26 10:43:21 darrenr Exp $"; #endif extern char *optarg; diff -cr ip_fil3.4.18/ipsd/ipsd.h ip_fil3.4.19/ipsd/ipsd.h *** ip_fil3.4.18/ipsd/ipsd.h Thu Aug 5 03:30:56 1999 --- ip_fil3.4.19/ipsd/ipsd.h Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1995-1998 Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. --- 1,7 ---- /* * (C)opyright 1995-1998 Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. diff -cr ip_fil3.4.18/ipsd/ipsdr.c ip_fil3.4.19/ipsd/ipsdr.c *** ip_fil3.4.18/ipsd/ipsdr.c Thu Aug 5 03:30:57 1999 --- ip_fil3.4.19/ipsd/ipsdr.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1995-1998 Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. --- 1,7 ---- /* * (C)opyright 1995-1998 Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. *************** *** 38,44 **** #ifndef lint static const char sccsid[] = "@(#)ipsdr.c 1.3 12/3/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsdr.c,v 2.1 1999/08/04 17:30:57 darrenr Exp $"; #endif extern char *optarg; --- 36,42 ---- #ifndef lint static const char sccsid[] = "@(#)ipsdr.c 1.3 12/3/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsdr.c,v 2.1.4.1 2001/06/26 10:43:21 darrenr Exp $"; #endif extern char *optarg; diff -cr ip_fil3.4.18/ipsd/linux.h ip_fil3.4.19/ipsd/linux.h *** ip_fil3.4.18/ipsd/linux.h Thu Aug 5 03:30:57 1999 --- ip_fil3.4.19/ipsd/linux.h Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * Copyright (C) 1997-1998 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * @(#)linux.h 1.1 8/19/95 */ --- 1,7 ---- /* * Copyright (C) 1997-1998 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)linux.h 1.1 8/19/95 */ diff -cr ip_fil3.4.18/ipsd/sbpf.c ip_fil3.4.19/ipsd/sbpf.c *** ip_fil3.4.18/ipsd/sbpf.c Thu Aug 5 03:30:57 1999 --- ip_fil3.4.19/ipsd/sbpf.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1995-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * */ #include --- 1,7 ---- /* * (C)opyright 1995-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. * */ #include diff -cr ip_fil3.4.18/ipsd/sdlpi.c ip_fil3.4.19/ipsd/sdlpi.c *** ip_fil3.4.18/ipsd/sdlpi.c Thu Aug 5 03:30:58 1999 --- ip_fil3.4.19/ipsd/sdlpi.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * */ --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. * */ diff -cr ip_fil3.4.18/ipsd/slinux.c ip_fil3.4.19/ipsd/slinux.c *** ip_fil3.4.18/ipsd/slinux.c Thu Aug 5 03:30:59 1999 --- ip_fil3.4.19/ipsd/slinux.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. diff -cr ip_fil3.4.18/ipsd/snit.c ip_fil3.4.19/ipsd/snit.c *** ip_fil3.4.18/ipsd/snit.c Thu Aug 5 03:30:59 1999 --- ip_fil3.4.19/ipsd/snit.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. * * The author of this software makes no garuntee about the * performance of this package or its suitability to fulfill any purpose. diff -cr ip_fil3.4.18/ipsend/arp.c ip_fil3.4.19/ipsend/arp.c *** ip_fil3.4.18/ipsend/arp.c Thu Aug 5 03:31:03 1999 --- ip_fil3.4.19/ipsend/arp.c Tue Jun 26 20:43:21 2001 *************** *** 1,13 **** /* * arp.c (C) 1995-1998 Darren Reed * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)arp.c 1.4 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: arp.c,v 2.1 1999/08/04 17:31:03 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * arp.c (C) 1995-1998 Darren Reed * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)arp.c 1.4 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: arp.c,v 2.1.4.1 2001/06/26 10:43:21 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/hpux.c ip_fil3.4.19/ipsend/hpux.c *** ip_fil3.4.18/ipsend/hpux.c Thu Aug 5 03:41:16 1999 --- ip_fil3.4.19/ipsend/hpux.c Tue Jun 26 20:43:21 2001 *************** *** 1,9 **** /* * (C)opyright 1997-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * (C)opyright 1997-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include diff -cr ip_fil3.4.18/ipsend/ip.c ip_fil3.4.19/ipsend/ip.c *** ip_fil3.4.18/ipsend/ip.c Wed Jan 10 17:21:19 2001 --- ip_fil3.4.19/ipsend/ip.c Tue Jun 26 20:43:21 2001 *************** *** 1,13 **** /* * ip.c (C) 1995-1998 Darren Reed * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995"; ! static const char rcsid[] = "@(#)$Id: ip.c,v 2.1.4.1 2001/01/10 06:21:19 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * ip.c (C) 1995-1998 Darren Reed * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995"; ! static const char rcsid[] = "@(#)$Id: ip.c,v 2.1.4.2 2001/06/26 10:43:21 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/ipresend.c ip_fil3.4.19/ipsend/ipresend.c *** ip_fil3.4.18/ipsend/ipresend.c Thu Aug 5 03:31:05 1999 --- ip_fil3.4.19/ipsend/ipresend.c Tue Jun 26 20:43:21 2001 *************** *** 6,18 **** * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipresend.c,v 2.1 1999/08/04 17:31:05 darrenr Exp $"; #endif #include #include --- 6,16 ---- * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipresend.c,v 2.1.4.1 2001/06/26 10:43:21 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/ipsend.c ip_fil3.4.19/ipsend/ipsend.c *** ip_fil3.4.18/ipsend/ipsend.c Wed Jan 10 17:21:19 2001 --- ip_fil3.4.19/ipsend/ipsend.c Tue Jun 26 20:43:21 2001 *************** *** 6,18 **** * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ipsend.c 1.5 12/10/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsend.c,v 2.2.2.1 2001/01/10 06:21:19 darrenr Exp $"; #endif #include #include --- 6,16 ---- * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ipsend.c 1.5 12/10/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsend.c,v 2.2.2.2 2001/06/26 10:43:21 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/ipsend.h ip_fil3.4.19/ipsend/ipsend.h *** ip_fil3.4.18/ipsend/ipsend.h Thu Aug 5 03:31:06 1999 --- ip_fil3.4.19/ipsend/ipsend.h Tue Jun 26 20:43:22 2001 *************** *** 6,16 **** * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * The author provides this program as-is, with no gaurantee for its ! * suitability for any specific purpose. The author takes no responsibility ! * for the misuse/abuse of this program and provides it for the sole purpose ! * of testing packet filter policies. This file maybe distributed freely ! * providing it is not modified and that this notice remains in tact. * */ #ifndef __P --- 6,12 ---- * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * See the IPFILTER.LICENCE file for details on licencing. * */ #ifndef __P diff -cr ip_fil3.4.18/ipsend/ipsopt.c ip_fil3.4.19/ipsend/ipsopt.c *** ip_fil3.4.18/ipsend/ipsopt.c Thu Aug 5 03:31:07 1999 --- ip_fil3.4.19/ipsend/ipsopt.c Tue Jun 26 20:43:22 2001 *************** *** 1,13 **** /* * Copyright (C) 1995-1998 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)ipsopt.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsopt.c,v 2.1 1999/08/04 17:31:07 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * Copyright (C) 1995-1998 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)ipsopt.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipsopt.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/iptest.c ip_fil3.4.19/ipsend/iptest.c *** ip_fil3.4.18/ipsend/iptest.c Sat Dec 4 14:37:05 1999 --- ip_fil3.4.19/ipsend/iptest.c Tue Jun 26 20:43:22 2001 *************** *** 6,18 **** * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: iptest.c,v 2.2 1999/12/04 03:37:05 darrenr Exp $"; #endif #include #include --- 6,16 ---- * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: iptest.c,v 2.2.2.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/iptests.c ip_fil3.4.19/ipsend/iptests.c *** ip_fil3.4.18/ipsend/iptests.c Thu Aug 5 03:31:09 1999 --- ip_fil3.4.19/ipsend/iptests.c Tue Jun 26 20:43:22 2001 *************** *** 1,13 **** /* * Copyright (C) 1993-1998 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: iptests.c,v 2.1 1999/08/04 17:31:09 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * Copyright (C) 1993-1998 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: iptests.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/larp.c ip_fil3.4.19/ipsend/larp.c *** ip_fil3.4.18/ipsend/larp.c Thu Aug 5 03:31:10 1999 --- ip_fil3.4.19/ipsend/larp.c Tue Jun 26 20:43:22 2001 *************** *** 1,13 **** /* * larp.c (C) 1995-1998 Darren Reed * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)larp.c 1.1 8/19/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: larp.c,v 2.1 1999/08/04 17:31:10 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * larp.c (C) 1995-1998 Darren Reed * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)larp.c 1.1 8/19/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: larp.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/linux.h ip_fil3.4.19/ipsend/linux.h *** ip_fil3.4.18/ipsend/linux.h Thu Aug 5 03:31:10 1999 --- ip_fil3.4.19/ipsend/linux.h Tue Jun 26 20:43:22 2001 *************** *** 1,9 **** /* * Copyright (C) 1995-1998 by Darren Reed. * ! * This code may be freely distributed as long as it retains this notice ! * and is not changed in any way. The author accepts no responsibility ! * for the use of this software. I hate legaleese, don't you ? * * @(#)linux.h 1.1 8/19/95 */ --- 1,7 ---- /* * Copyright (C) 1995-1998 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * * @(#)linux.h 1.1 8/19/95 */ diff -cr ip_fil3.4.18/ipsend/lsock.c ip_fil3.4.19/ipsend/lsock.c *** ip_fil3.4.18/ipsend/lsock.c Thu Aug 5 03:31:11 1999 --- ip_fil3.4.19/ipsend/lsock.c Tue Jun 26 20:43:22 2001 *************** *** 1,13 **** /* * lsock.c (C) 1995-1998 Darren Reed * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)lsock.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: lsock.c,v 2.1 1999/08/04 17:31:11 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * lsock.c (C) 1995-1998 Darren Reed * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)lsock.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: lsock.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/resend.c ip_fil3.4.19/ipsend/resend.c *** ip_fil3.4.18/ipsend/resend.c Wed Jan 10 17:21:20 2001 --- ip_fil3.4.19/ipsend/resend.c Tue Jun 26 20:43:22 2001 *************** *** 6,18 **** * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: resend.c,v 2.1.4.1 2001/01/10 06:21:20 darrenr Exp $"; #endif #include #include --- 6,16 ---- * conditions, enough of the TCP header is missing for unpredictable * results unless the filter is aware that this can happen. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: resend.c,v 2.1.4.2 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/sbpf.c ip_fil3.4.19/ipsend/sbpf.c *** ip_fil3.4.18/ipsend/sbpf.c Thu Aug 5 03:31:13 1999 --- ip_fil3.4.19/ipsend/sbpf.c Tue Jun 26 20:43:22 2001 *************** *** 1,9 **** /* * (C)opyright 1995-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * (C)opyright 1995-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 43,49 **** #if !defined(lint) static const char sccsid[] = "@(#)sbpf.c 1.3 8/25/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sbpf.c,v 2.1 1999/08/04 17:31:13 darrenr Exp $"; #endif /* --- 41,47 ---- #if !defined(lint) static const char sccsid[] = "@(#)sbpf.c 1.3 8/25/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sbpf.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif /* diff -cr ip_fil3.4.18/ipsend/sdlpi.c ip_fil3.4.19/ipsend/sdlpi.c *** ip_fil3.4.18/ipsend/sdlpi.c Wed Feb 28 21:51:11 2001 --- ip_fil3.4.19/ipsend/sdlpi.c Tue Jun 26 20:43:22 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include *************** *** 40,46 **** #if !defined(lint) static const char sccsid[] = "@(#)sdlpi.c 1.3 10/30/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sdlpi.c,v 2.1.4.1 2001/02/28 10:51:11 darrenr Exp $"; #endif #define CHUNKSIZE 8192 --- 38,44 ---- #if !defined(lint) static const char sccsid[] = "@(#)sdlpi.c 1.3 10/30/95 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sdlpi.c,v 2.1.4.2 2001/06/26 10:43:22 darrenr Exp $"; #endif #define CHUNKSIZE 8192 diff -cr ip_fil3.4.18/ipsend/sirix.c ip_fil3.4.19/ipsend/sirix.c *** ip_fil3.4.18/ipsend/sirix.c Sun Aug 1 20:57:30 1999 --- ip_fil3.4.19/ipsend/sirix.c Tue Jun 26 20:43:22 2001 *************** *** 2,10 **** * (C)opyright 1992-1998 Darren Reed. * (C)opyright 1997 Marc Boucher. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 2,8 ---- * (C)opyright 1992-1998 Darren Reed. * (C)opyright 1997 Marc Boucher. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include diff -cr ip_fil3.4.18/ipsend/slinux.c ip_fil3.4.19/ipsend/slinux.c *** ip_fil3.4.18/ipsend/slinux.c Thu Aug 5 03:31:14 1999 --- ip_fil3.4.19/ipsend/slinux.c Tue Jun 26 20:43:22 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include *************** *** 29,35 **** #if !defined(lint) static const char sccsid[] = "@(#)slinux.c 1.2 8/25/95"; ! static const char rcsid[] = "@(#)$Id: slinux.c,v 2.1 1999/08/04 17:31:14 darrenr Exp $"; #endif #define CHUNKSIZE 8192 --- 27,33 ---- #if !defined(lint) static const char sccsid[] = "@(#)slinux.c 1.2 8/25/95"; ! static const char rcsid[] = "@(#)$Id: slinux.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #define CHUNKSIZE 8192 diff -cr ip_fil3.4.18/ipsend/snit.c ip_fil3.4.19/ipsend/snit.c *** ip_fil3.4.18/ipsend/snit.c Thu Aug 5 03:31:15 1999 --- ip_fil3.4.19/ipsend/snit.c Tue Jun 26 20:43:22 2001 *************** *** 1,9 **** /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include --- 1,7 ---- /* * (C)opyright 1992-1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include *************** *** 40,46 **** #if !defined(lint) static const char sccsid[] = "@(#)snit.c 1.5 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: snit.c,v 2.1 1999/08/04 17:31:15 darrenr Exp $"; #endif #define CHUNKSIZE 8192 --- 38,44 ---- #if !defined(lint) static const char sccsid[] = "@(#)snit.c 1.5 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: snit.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; #endif #define CHUNKSIZE 8192 diff -cr ip_fil3.4.18/ipsend/sock.c ip_fil3.4.19/ipsend/sock.c *** ip_fil3.4.18/ipsend/sock.c Sun Dec 17 08:05:44 2000 --- ip_fil3.4.19/ipsend/sock.c Tue Jun 26 20:43:22 2001 *************** *** 1,13 **** /* * sock.c (C) 1995-1998 Darren Reed * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if !defined(lint) static const char sccsid[] = "@(#)sock.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sock.c,v 2.1.4.1 2000/12/16 21:05:44 darrenr Exp $"; #endif #include #include --- 1,11 ---- /* * sock.c (C) 1995-1998 Darren Reed * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if !defined(lint) static const char sccsid[] = "@(#)sock.c 1.2 1/11/96 (C)1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: sock.c,v 2.1.4.2 2001/06/26 10:43:22 darrenr Exp $"; #endif #include #include diff -cr ip_fil3.4.18/ipsend/ultrix.c ip_fil3.4.19/ipsend/ultrix.c *** ip_fil3.4.18/ipsend/ultrix.c Thu Aug 5 03:41:16 1999 --- ip_fil3.4.19/ipsend/ultrix.c Tue Jun 26 20:43:23 2001 *************** *** 1,9 **** /* * (C)opyright 1998 Darren Reed. (from tcplog) * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * (C)opyright 1998 Darren Reed. (from tcplog) * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include diff -cr ip_fil3.4.18/ipt.c ip_fil3.4.19/ipt.c *** ip_fil3.4.18/ipt.c Sun Apr 15 16:46:33 2001 --- ip_fil3.4.19/ipt.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #ifdef __FreeBSD__ # ifndef __FreeBSD_cc_version *************** *** 61,67 **** #if !defined(lint) static const char sccsid[] = "@(#)ipt.c 1.19 6/3/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipt.c,v 2.6.2.1 2001/04/15 06:46:33 darrenr Exp $"; #endif extern char *optarg; --- 59,65 ---- #if !defined(lint) static const char sccsid[] = "@(#)ipt.c 1.19 6/3/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ipt.c,v 2.6.2.2 2001/06/26 10:43:19 darrenr Exp $"; #endif extern char *optarg; diff -cr ip_fil3.4.18/ipt.h ip_fil3.4.19/ipt.h *** ip_fil3.4.18/ipt.h Tue Mar 14 09:10:25 2000 --- ip_fil3.4.19/ipt.h Tue Jun 26 20:43:19 2001 *************** *** 1,10 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. ! * $Id: ipt.h,v 2.2 2000/03/13 22:10:25 darrenr Exp $ */ #ifndef __IPT_H__ --- 1,8 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. ! * $Id: ipt.h,v 2.2.2.1 2001/06/26 10:43:19 darrenr Exp $ */ #ifndef __IPT_H__ diff -cr ip_fil3.4.18/kmem.c ip_fil3.4.19/kmem.c *** ip_fil3.4.18/kmem.c Thu May 31 20:24:08 2001 --- ip_fil3.4.19/kmem.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* * kmemcpy() - copies n bytes from kernel memory into user buffer. --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* * kmemcpy() - copies n bytes from kernel memory into user buffer. *************** *** 20,26 **** #if !defined(lint) static const char sccsid[] = "@(#)kmem.c 1.4 1/12/96 (C) 1992 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: kmem.c,v 2.2.2.1 2001/05/31 10:24:08 darrenr Exp $"; #endif static int kmemfd = -1; --- 18,24 ---- #if !defined(lint) static const char sccsid[] = "@(#)kmem.c 1.4 1/12/96 (C) 1992 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: kmem.c,v 2.2.2.2 2001/06/26 10:43:19 darrenr Exp $"; #endif static int kmemfd = -1; diff -cr ip_fil3.4.18/kmem.h ip_fil3.4.19/kmem.h *** ip_fil3.4.18/kmem.h Thu May 31 20:24:08 2001 --- ip_fil3.4.19/kmem.h Tue Jun 26 20:43:19 2001 *************** *** 1,10 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. ! * $Id: kmem.h,v 2.2.2.1 2001/05/31 10:24:08 darrenr Exp $ */ #ifndef __KMEM_H__ --- 1,8 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. ! * $Id: kmem.h,v 2.2.2.2 2001/06/26 10:43:19 darrenr Exp $ */ #ifndef __KMEM_H__ diff -cr ip_fil3.4.18/linux.h ip_fil3.4.19/linux.h *** ip_fil3.4.18/linux.h Tue Mar 14 09:10:25 2000 --- ip_fil3.4.19/linux.h Tue Jun 26 20:43:19 2001 *************** *** 1,13 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. The author accepts no ! * responsibility and is not changed in any way. * ! * I hate legaleese, don't you ? ! * $Id: linux.h,v 2.2 2000/03/13 22:10:25 darrenr Exp $ */ #include --- 1,9 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * ! * $Id: linux.h,v 2.2.2.1 2001/06/26 10:43:19 darrenr Exp $ */ #include diff -cr ip_fil3.4.18/misc.c ip_fil3.4.19/misc.c *** ip_fil3.4.18/misc.c Tue Mar 14 09:10:25 2000 --- ip_fil3.4.19/misc.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #if (SOLARIS2 >= 7) # define _SYS_VARARGS_H --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #if (SOLARIS2 >= 7) # define _SYS_VARARGS_H *************** *** 52,58 **** #if !defined(lint) static const char sccsid[] = "@(#)misc.c 1.3 2/4/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: misc.c,v 2.2 2000/03/13 22:10:25 darrenr Exp $"; #endif extern int opts; --- 50,56 ---- #if !defined(lint) static const char sccsid[] = "@(#)misc.c 1.3 2/4/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: misc.c,v 2.2.2.1 2001/06/26 10:43:19 darrenr Exp $"; #endif extern int opts; diff -cr ip_fil3.4.18/ml_ipl.c ip_fil3.4.19/ml_ipl.c *** ip_fil3.4.18/ml_ipl.c Tue Mar 14 09:10:26 2000 --- ip_fil3.4.19/ml_ipl.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. The author accepts no * responsibility and is not changed in any way. * * I hate legaleese, don't you ? --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. * responsibility and is not changed in any way. * * I hate legaleese, don't you ? diff -cr ip_fil3.4.18/mlf_ipl.c ip_fil3.4.19/mlf_ipl.c *** ip_fil3.4.18/mlf_ipl.c Sun May 27 03:00:01 2001 --- ip_fil3.4.19/mlf_ipl.c Tue Jun 26 20:43:19 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate diff -cr ip_fil3.4.18/mli_ipl.c ip_fil3.4.19/mli_ipl.c *** ip_fil3.4.18/mli_ipl.c Sun Nov 12 22:55:29 2000 --- ip_fil3.4.19/mli_ipl.c Tue Jun 26 20:43:19 2001 *************** *** 1,10 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * (C)opyright 1997 by Marc Boucher. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original authors and the contributors. */ /* TODO: (MARCXXX) --- 1,8 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * (C)opyright 1997 by Marc Boucher. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* TODO: (MARCXXX) diff -cr ip_fil3.4.18/mln_ipl.c ip_fil3.4.19/mln_ipl.c *** ip_fil3.4.18/mln_ipl.c Tue Mar 14 09:10:26 2000 --- ip_fil3.4.19/mln_ipl.c Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate diff -cr ip_fil3.4.18/mls_ipl.c ip_fil3.4.19/mls_ipl.c *** ip_fil3.4.18/mls_ipl.c Tue Mar 14 09:10:26 2000 --- ip_fil3.4.19/mls_ipl.c Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* * 29/12/94 Added code from Marc Huber to allow it to allocate *************** *** 42,48 **** #if !defined(lint) static const char sccsid[] = "@(#)mls_ipl.c 2.6 10/15/95 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: mls_ipl.c,v 2.2 2000/03/13 22:10:26 darrenr Exp $"; #endif extern int ipldetach __P((void)); --- 40,46 ---- #if !defined(lint) static const char sccsid[] = "@(#)mls_ipl.c 2.6 10/15/95 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: mls_ipl.c,v 2.2.2.1 2001/06/26 10:43:20 darrenr Exp $"; #endif extern int ipldetach __P((void)); diff -cr ip_fil3.4.18/natparse.c ip_fil3.4.19/natparse.c *** ip_fil3.4.18/natparse.c Fri Apr 6 23:47:35 2001 --- ip_fil3.4.19/natparse.c Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 54,60 **** #if !defined(lint) static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: natparse.c,v 1.17.2.9 2001/04/06 13:47:35 darrenr Exp $"; #endif --- 52,58 ---- #if !defined(lint) static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: natparse.c,v 1.17.2.10 2001/06/26 10:43:20 darrenr Exp $"; #endif diff -cr ip_fil3.4.18/opt.c ip_fil3.4.19/opt.c *** ip_fil3.4.18/opt.c Tue Mar 14 09:10:26 2000 --- ip_fil3.4.19/opt.c Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #include --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #include *************** *** 27,33 **** #if !defined(lint) static const char sccsid[] = "@(#)opt.c 1.8 4/10/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: opt.c,v 2.2 2000/03/13 22:10:26 darrenr Exp $"; #endif extern int opts; --- 25,31 ---- #if !defined(lint) static const char sccsid[] = "@(#)opt.c 1.8 4/10/96 (C) 1993-2000 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: opt.c,v 2.2.2.1 2001/06/26 10:43:20 darrenr Exp $"; #endif extern int opts; diff -cr ip_fil3.4.18/parse.c ip_fil3.4.19/parse.c *** ip_fil3.4.18/parse.c Tue Jun 5 18:09:36 2001 --- ip_fil3.4.19/parse.c Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #include #if !defined(__SVR4) && !defined(__svr4__) --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #include #if !defined(__SVR4) && !defined(__svr4__) diff -cr ip_fil3.4.18/pcap.h ip_fil3.4.19/pcap.h *** ip_fil3.4.18/pcap.h Tue Mar 14 09:10:27 2000 --- ip_fil3.4.19/pcap.h Tue Jun 26 20:43:20 2001 *************** *** 1,10 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. ! * $Id: pcap.h,v 2.2 2000/03/13 22:10:27 darrenr Exp $ */ /* * This header file is constructed to match the version described by --- 1,9 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. ! * ! * $Id: pcap.h,v 2.2.2.1 2001/06/26 10:43:20 darrenr Exp $ */ /* * This header file is constructed to match the version described by diff -cr ip_fil3.4.18/snoop.h ip_fil3.4.19/snoop.h *** ip_fil3.4.18/snoop.h Tue Mar 14 09:10:27 2000 --- ip_fil3.4.19/snoop.h Tue Jun 26 20:43:20 2001 *************** *** 1,9 **** /* ! * Copyright (C) 1993-2000 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ #ifndef __SNOOP_H__ --- 1,7 ---- /* ! * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ #ifndef __SNOOP_H__ *************** *** 11,17 **** /* * written to comply with the RFC (1761) from Sun. ! * $Id: snoop.h,v 2.2 2000/03/13 22:10:27 darrenr Exp $ */ struct snoophdr { char s_id[8]; --- 9,15 ---- /* * written to comply with the RFC (1761) from Sun. ! * $Id: snoop.h,v 2.2.2.1 2001/06/26 10:43:20 darrenr Exp $ */ struct snoophdr { char s_id[8]; diff -cr ip_fil3.4.18/solaris.c ip_fil3.4.19/solaris.c *** ip_fil3.4.18/solaris.c Sun May 27 03:00:25 2001 --- ip_fil3.4.19/solaris.c Wed Jun 27 02:27:16 2001 *************** *** 1,12 **** /* * Copyright (C) 1993-2001 by Darren Reed. * ! * Redistribution and use in source and binary forms are permitted ! * provided that this notice is preserved and due credit is given ! * to the original author and the contributors. */ /* #pragma ident "@(#)solaris.c 1.12 6/5/96 (C) 1995 Darren Reed"*/ ! #pragma ident "@(#)$Id: solaris.c,v 2.15.2.16 2001/05/26 17:00:25 darrenr Exp $" #include #include --- 1,10 ---- /* * Copyright (C) 1993-2001 by Darren Reed. * ! * See the IPFILTER.LICENCE file for details on licencing. */ /* #pragma ident "@(#)solaris.c 1.12 6/5/96 (C) 1995 Darren Reed"*/ ! #pragma ident "@(#)$Id: solaris.c,v 2.15.2.18 2001/06/26 16:27:16 darrenr Exp $" #include #include *************** *** 355,360 **** --- 353,366 ---- drv_usectohz(500000)); if (fr_running == 1) return DDI_SUCCESS; + #if SOLARIS2 >= 8 + case DDI_RESUME : + case DDI_PM_RESUME : + if (ipfr_timer_id == 0) + ipfr_timer_id = timeout(ipfr_slowtimer, NULL, + drv_usectohz(500000)); + return DDI_SUCCESS; + #endif default: return DDI_FAILURE; } *************** *** 422,427 **** --- 428,446 ---- cmn_err(CE_CONT, "%s detached\n", ipfilter_version); return (DDI_SUCCESS); } + #if SOLARIS2 >= 8 + case DDI_SUSPEND : + case DDI_PM_SUSPEND : + if (ipfr_timer_id != 0) { + untimeout(ipfr_timer_id); + ipfr_timer_id = 0; + } + if (synctimeoutid) { + untimeout(synctimeoutid); + synctimeoutid = 0; + } + return DDI_SUCCESS; + #endif default: return (DDI_FAILURE); } *************** *** 498,504 **** m = m->b_cont; cmn_err(CE_CONT, " !IP %s:%d %d %p %p %p %d %p/%d %p/%d %p %d %d %p\n", ! qif ? qif->qf_name : "?", out, qif->qf_hl, q, q ? q->q_ptr : NULL, q ? q->q_qinfo : NULL, mt->b_wptr - mt->b_rptr, m, MTYPE(m), mt, MTYPE(mt), m->b_rptr, m->b_wptr - m->b_rptr, off, ip); --- 517,523 ---- m = m->b_cont; cmn_err(CE_CONT, " !IP %s:%d %d %p %p %p %d %p/%d %p/%d %p %d %d %p\n", ! qif ? qif->qf_name : "?", out, qif ? qif->qf_hl : -1, q, q ? q->q_ptr : NULL, q ? q->q_qinfo : NULL, mt->b_wptr - mt->b_rptr, m, MTYPE(m), mt, MTYPE(mt), m->b_rptr, m->b_wptr - m->b_rptr, off, ip); *************** *** 577,582 **** --- 596,613 ---- dl_unitdata_ind_t *dl = (dl_unitdata_ind_t *)bp; if (dl->dl_primitive == DL_UNITDATA_IND) { multi = dl->dl_group_address; + m = mt->b_cont; + /* + * This is a complete kludge to try and work around + * some bizarre packets which drop through into + * fr_donotip. + */ + if (m && multi && ((*((u_char *)m->b_rptr) == 0x0) && + ((*((u_char *)m->b_rptr + 2) == 0x45)))) { + ip = (ip_t *)(m->b_rptr + 2); + off = 2; + } else + off = 0; } else if (dl->dl_primitive != DL_UNITDATA_REQ) { ip = (ip_t *)dl; if ((ip->ip_v == IPVERSION) && *************** *** 604,622 **** return 0; /* No data blocks */ } - /* - * This is a complete kludge to try and work around some bizarre - * packets which drop through into fr_donotip. - */ - if ((mt != m) && (MTYPE(mt) == M_PROTO || MTYPE(mt) == M_PCPROTO)) { - dl_unitdata_ind_t *dl = (dl_unitdata_ind_t *)bp; - if ((dl->dl_primitive == DL_UNITDATA_IND) && - (dl->dl_group_address == 1)) - if (((*((u_char *)m->b_rptr) == 0x0) && - ((*((u_char *)m->b_rptr + 2) == 0x45)))) - off += 2; - } - ip = (ip_t *)(m->b_rptr + off); /* MMM */ /* --- 635,640 ---- *************** *** 671,680 **** if (!plen) return -1; /* Jumbo gram */ plen += sizeof(*ip6); - sap = IP6_DL_SAP; } #endif else { hlen = 0; sap = -1; } --- 689,698 ---- if (!plen) return -1; /* Jumbo gram */ plen += sizeof(*ip6); } #endif else { + plen = 0; hlen = 0; sap = -1; } *************** *** 780,791 **** #ifndef sparc # if SOLARIS2 >= 8 if (sap == IP6_DL_SAP) { ! ip6->ip6_plen = plen; } else { # endif __ipoff = (u_short)ip->ip_off; ! ip->ip_len = plen; ip->ip_off = ntohs(__ipoff); # if SOLARIS2 >= 8 } --- 798,809 ---- #ifndef sparc # if SOLARIS2 >= 8 if (sap == IP6_DL_SAP) { ! ip6->ip6_plen = htons(plen); } else { # endif __ipoff = (u_short)ip->ip_off; ! ip->ip_len = htons(plen); ip->ip_off = ntohs(__ipoff); # if SOLARIS2 >= 8 } *************** *** 800,806 **** if (( #if SOLARIS2 >= 8 ! (sap == IP6_DL_SAP) && (mlen < iphlen + plen)) || ((sap == 0) && #endif ((iphlen < hlen) || (iphlen > plen) || (mlen < plen)))) { --- 818,824 ---- if (( #if SOLARIS2 >= 8 ! (sap == IP6_DL_SAP) && (mlen < plen)) || ((sap == 0) && #endif ((iphlen < hlen) || (iphlen > plen) || (mlen < plen)))) { *************** *** 870,876 **** */ if ((hlen > len)) { if (!pullupmsg(m, (int)hlen)) { ! cmn_err(CE_NOTE, "pullupmsg failed\n"); frstats[out].fr_pull[1]++; return -1; } --- 888,894 ---- */ if ((hlen > len)) { if (!pullupmsg(m, (int)hlen)) { ! cmn_err(CE_NOTE, "pullupmsg failed"); frstats[out].fr_pull[1]++; return -1; } *************** *** 913,919 **** #endif } else cmn_err(CE_NOTE, ! "!IP Filter: *mp %p mt %p %s\n", *mp, mt, "mblk changed, cannot revert ip_len, ip_off"); } return err; --- 931,937 ---- #endif } else cmn_err(CE_NOTE, ! "!IP Filter: *mp %p mt %p %s", *mp, mt, "mblk changed, cannot revert ip_len, ip_off"); } return err; *************** *** 1213,1218 **** --- 1231,1237 ---- RWLOCK_EXIT(&ipf_solaris); } + static int ipf_ip_qin(q, mb) queue_t *q; mblk_t *mb; *************** *** 1250,1256 **** case SIOCSIFADDR: case SIOCSIFFLAGS: #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: ipf_ip_qin() M_IOCTL type=0x%x\n", ioc->ioc_cmd); #endif WRITE_ENTER(&ipfs_mutex); --- 1269,1275 ---- case SIOCSIFADDR: case SIOCSIFFLAGS: #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: ipf_ip_qin() M_IOCTL type=0x%x", ioc->ioc_cmd); #endif WRITE_ENTER(&ipfs_mutex); *************** *** 1275,1281 **** void solipdrvattach() { #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: solipdrvattach() %d ipinfo=0x%lx\n", ipdrvattcnt, &ipinfo); #endif --- 1294,1300 ---- void solipdrvattach() { #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: solipdrvattach() %d ipinfo=0x%lx", ipdrvattcnt, &ipinfo); #endif *************** *** 1290,1296 **** int solipdrvdetach() { #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: solipdrvdetach() %d ipinfo=0x%lx\n", ipdrvattcnt, &ipinfo); #endif --- 1309,1315 ---- int solipdrvdetach() { #ifdef IPFDEBUG ! cmn_err(CE_NOTE, "IP Filter: solipdrvdetach() %d ipinfo=0x%lx", ipdrvattcnt, &ipinfo); #endif *************** *** 1352,1358 **** KMALLOC(qif, qif_t *); if (!qif) { cmn_err(CE_WARN, ! "IP Filter: malloc(%d) for qif_t failed\n", sizeof(qif_t)); RWLOCK_EXIT(&ipfs_mutex); continue; --- 1371,1377 ---- KMALLOC(qif, qif_t *); if (!qif) { cmn_err(CE_WARN, ! "IP Filter: malloc(%d) for qif_t failed", sizeof(qif_t)); RWLOCK_EXIT(&ipfs_mutex); continue; *************** *** 1430,1437 **** if (qif->qf_hl == 0) cmn_err(CE_WARN, ! "Unknown layer 2 header size for %s type %d\n", ! qif->qf_name, il->ill_type); } /* --- 1449,1456 ---- if (qif->qf_hl == 0) cmn_err(CE_WARN, ! "Unknown layer 2 header size for %s type %d", ! il->ill_name, il->ill_type); } /* *************** *** 1814,1820 **** if (!ir) ir = (ire_t *)-1; ! fd.fd_ifp = (struct ifnet *)ir; fd.fd_ip = ip->ip_dst; fdp = &fd; } --- 1833,1839 ---- if (!ir) ir = (ire_t *)-1; ! fd.fd_ifp = (struct ifnet *)ir; fd.fd_ip = ip->ip_dst; fdp = &fd; } diff -cr ip_fil3.4.18/test/Makefile ip_fil3.4.19/test/Makefile *** ip_fil3.4.18/test/Makefile Sun Apr 15 16:45:03 2001 --- ip_fil3.4.19/test/Makefile Wed Jun 27 12:17:11 2001 *************** *** 38,43 **** @/bin/sh ./nattest $@ clean: ! /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f14 results/* /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 /bin/rm -f n1 n2 n3 n4 n5 n6 n7 --- 38,43 ---- @/bin/sh ./nattest $@ clean: ! /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f13 f12 f14 results/* /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 /bin/rm -f n1 n2 n3 n4 n5 n6 n7