diff options
Diffstat (limited to 'contrib/ipfilter')
108 files changed, 1586 insertions, 824 deletions
diff --git a/contrib/ipfilter/BSD/Makefile b/contrib/ipfilter/BSD/Makefile index 72086a0..9a2158b 100644 --- a/contrib/ipfilter/BSD/Makefile +++ b/contrib/ipfilter/BSD/Makefile @@ -8,7 +8,8 @@ SBINDEST=/sbin MANDIR=/usr/share/man SEARCHDIRS!=echo $(BINDEST) $(SBINDEST) /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin | awk '{for(i=1;i<NF;i++){print $$i;}}' - | sort -u -CC=cc -Wall -Wuninitialized -Wstrict-prototypes -O +CC=gcc -Wall -Wuninitialized -Wstrict-prototypes -O +#UFLAGS=-fprofile-arcs -ftest-coverage CFLAGS=-g -I$(TOP) # # For NetBSD/FreeBSD @@ -45,7 +46,7 @@ MODOBJS=ip_fil.o fil.o ml_ipl.o ip_nat.o ip_frag.o ip_state.o ip_proxy.o \ ip_scan.o ip_sync.o # ip_trafcon.o DFLAGS=$(IPFLKM) $(IPFLOG) $(LOOKUP) $(SYNC) $(DEF) $(DLKM) $(IPFBPF) -IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o +IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter_u.o IPT=ipftest.o fil_u.o ip_frag_u.o ip_state_u.o ip_nat_u.o \ ip_proxy_u.o ip_auth_u.o ip_htable_u.o ip_lookup_u.o ip_pool_u.o \ ip_scan_u.o ip_sync_u.o ip_rules_u.o ip_fil_u.o ip_log_u.o \ @@ -66,7 +67,8 @@ LIBSRC=$(TOP)/lib RANLIB=ranlib AROPTS=cq HERE!=pwd -CCARGS=-I. $(DEBUG) $(CFLAGS) +CCARGS=-I. $(DEBUG) $(CFLAGS) $(UFLAGS) +KCARGS=-I. $(DEBUG) $(CFLAGS) # # Extra is option kernel things we always want in user space. # @@ -77,6 +79,9 @@ include $(TOP)/lib/Makefile build all: machine $(OBJ)/libipf.a ipf ipfs ipfstat ipftest ipmon ipnat \ ippool ipscan ipsyncm ipsyncs $(LKM) $(LKMR) -sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done' + -/bin/rm -f ../tools ./tools + -ln -s ../tools . + -ln -s ../tools .. machine: Makefile.kmod if [ -f Makefile.kmod ] ; then \ @@ -135,7 +140,7 @@ fil_u.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h \ fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ipl.h \ $(TOP)/ip_rules.h - $(CC) $(CCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \ + $(CC) $(KCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \ -c $(TOP)/fil.c -o $@ ipf.o: $(TOOL)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/opts.h @@ -240,8 +245,8 @@ ipfrule.ko.5: ip_rulesx.o $(MLR) ld -Bshareable -d -warn-common -o $(LKMR:S/.5$//) $(.TARGET:S/.ko/.kld/) ipfrule.ko: ip_rulesx.o $(MLR) gensetdefs ip_rulesx.o $(MLR) - $(CC) $(CCARGS) -c setdef0.c - $(CC) $(CCARGS) -c setdef1.c + $(CC) $(KCARGS) -c setdef0.c + $(CC) $(KCARGS) -c setdef1.c ld -Bshareable -o $@ setdef0.o ip_rulesx.o $(MLR) setdef1.o ipf.ko.5 ipl.ko.5: $(MODOBJS) @@ -250,59 +255,59 @@ ipf.ko.5 ipl.ko.5: $(MODOBJS) ipf.ko ipl.ko: $(MODOBJS) gensetdefs $(MODOBJS) - $(CC) $(CCARGS) -c setdef0.c - $(CC) $(CCARGS) -c setdef1.c + $(CC) $(KCARGS) -c setdef0.c + $(CC) $(KCARGS) -c setdef1.c ld -Bshareable -o $@ setdef0.o $(MODOBJS) setdef1.o ip_nat.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@ ip_frag.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@ ip_state.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h \ $(TOP)/ip_fil.h $(TOP)/ip_nat.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@ ip_proxy.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \ $(TOP)/ip_fil.h $(PROXYLIST) $(TOP)/ip_nat.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@ ip_auth.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h \ $(TOP)/ip_fil.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@ ip_fil.c: /bin/rm -f ip_fil.c ln -s $(TOP)/ip_fil_`uname -s|tr A-Z a-z`.c ip_fil.c ip_fil.o: ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h - $(CC) $(CCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@ ip_log.o: $(TOP)/ip_log.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@ ip_scan.o: $(TOP)/ip_scan.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_scan.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@ ip_sync.o: $(TOP)/ip_sync.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_sync.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@ ip_pool.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ $(TOP)/ip_lookup.h $(TOP)/ip_pool.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@ ip_htable.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ $(TOP)/ip_lookup.h $(TOP)/ip_htable.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@ ip_lookup.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ $(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@ ip_trafcon.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ $(TOP)/ip_trafcon.h - $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@ + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@ vnode_if.h: $(VNODESHDIR)/vnode_if.src mkdir -p ../sys @@ -449,6 +454,7 @@ clean: ${RM} -f ipnat_y.c ipnat_y.h ipnat_l.c ipnat_l.h ${RM} -f ipmon_y.c ipmon_y.h ipmon_l.c ipmon_l.h ${RM} -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h + ${RM} -f *.da *.gcov *.bb *.bbg tools ${MAKE} -f Makefile.ipsend ${MFLAGS} clean if [ -f Makefile.kmod ] ; then \ @@ -508,3 +514,10 @@ install: fi \ done (cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP)) + +coverage: + ksh -c 'for i in *.da; do j=$${i%%.da}.c; gcov $$j 2>&1 | egrep -v "y.tab.c|Could|Creating|_l\.c|\.h"; done' | sort -n > report + sort -n report | perl -e 'while(<>) { next if (/^0.00/); s/\%//g; @F=split;$$lc+=$$F[2];$$t += $$F[0]/100*$$F[2];} printf "%d of %d = %d%%\n", $$t, $$lc,$$t/$$lc*100;' >> report + +clean-coverage: + /bin/rm -f *.gcov *.da diff --git a/contrib/ipfilter/BSD/Makefile.ipsend b/contrib/ipfilter/BSD/Makefile.ipsend index 410ea67..a83de1c 100644 --- a/contrib/ipfilter/BSD/Makefile.ipsend +++ b/contrib/ipfilter/BSD/Makefile.ipsend @@ -1,5 +1,5 @@ # -# Id: Makefile.ipsend,v 2.8 2002/05/22 16:15:36 darrenr Exp +# $Id: Makefile.ipsend,v 2.8 2002/05/22 16:15:36 darrenr Exp $ # BINDEST=/usr/sbin diff --git a/contrib/ipfilter/BSD/kupgrade b/contrib/ipfilter/BSD/kupgrade index 91f32da..77a6ba1 100644 --- a/contrib/ipfilter/BSD/kupgrade +++ b/contrib/ipfilter/BSD/kupgrade @@ -31,6 +31,14 @@ else major=x fi +if [ ! -f ip_rules.c -o ! -f ip_rules.h ] ; then + echo "Please do a build of ipfilter and then run the following" + echo "command to build extra files:" + echo + echo "make ip_rules.c" + exit 1 +fi + echo -n "Installing " for j in auth frag nat proxy scan state sync pool htable lookup rules; do for i in ip_$j.[ch]; do diff --git a/contrib/ipfilter/HISTORY b/contrib/ipfilter/HISTORY index 9b93e83..32daed4 100644 --- a/contrib/ipfilter/HISTORY +++ b/contrib/ipfilter/HISTORY @@ -10,6 +10,85 @@ # and especially those who have found the time to port IP Filter to new # platforms. # +4.1.10 - Released 6 December 2005 + +Expand regression testing to cover more features + +Add "coverage" build target for BSD + +Fix building 64bit sparc target for Solaris + +Add IPv6 mobility header to list of accepted keywords for V6 headers + +Resolve locking problems on Solaris when sending RST/icmp packets + +#ifdef's for IPFILTER_BPF need to check if words are defined before +using them in comparisons + +Add checking for SACK permitted option in TCP SYN packets + +Fix loading anonymous pools from inline rule configuration groups + +Add -C command line option to ipftest + +Include extra "const" from NetBSD + +Don't require SIOCKSTLCK for SIOCSTPUT + +Fix some use of "sticky" on NAT rules + +Fix statistical counting of deleting state for TCP connections + +Fix compile problems caused by changes to is_opt/is_optmsk in ip_sync.c + +Fix TCP out-of-window (OOW) problems: +- window scaling turned off if one chose for its scale factor +- Microsoft Windows TCP sends the "next packet" to the right of the window + when using SACK and filling in a hole + +4.1.9 - Released 13 August 2005 + +make ipfilter fix IPv4 header checksums for outgoing packets if BRIDGE_IPF +is defined when compiled. + +move the definition of SIOCPROXY from ip_nat.h to ip_proxy.h + +make the BSD/upgrade script more instructive about the requiements for +ip_rules.[ch] when it is run + +register for interface events on FreeBSD (>5.2.1) and NetBSD so that +"ipf -y" is not not requried to tell ipfilter about interface changes. + +for "quick" rules that do "keep state", move the state adding into the rule +evaluation so that we can detect it failing as rules are evaluated and +continue on to the next rather than wait until we're done and it's too late +to recover for more rule processing. + +mark ICMP packets advertising an MTU that's too small as being bad + +rework ipv6 header parsing to get better code reuse and fix logic errors +in dealing with ipv6 packets containing fragment headers. Also, where a +protocol handler was doing both v4 & v6, make a seperate function for each. + +build for both amd64 and i86pc (32bit) on Solaris10 and later, if possible + +include start of work to get IPFilter working on AIX 5.3 + +Use FI_ICMPERR flag rather than try to compute its equivalent all the time + +Rewrork IPv6 extension header parsing to get better code reuse + +Add missing timeout on Linux + +Fix for locking when reading from ipsync (Frank Volf) + +Fix insertion/appending of rules that use a collection number + +Somehow turning up the spl knob to splnet disappeared on platforms that still +use the spl interface. + +fix problems with "ipf -T" not listing multiple variables properly + 4.1.8 - Released 29 March 2005 include path from Phil Dibowitz for sorting ipfstat -t output by source or diff --git a/contrib/ipfilter/l4check/http.ok b/contrib/ipfilter/l4check/http.ok index 0e7dd90..2b5d2c1 100644 --- a/contrib/ipfilter/l4check/http.ok +++ b/contrib/ipfilter/l4check/http.ok @@ -1 +1 @@ -<HTML> +<HTML>
\ No newline at end of file diff --git a/contrib/ipfilter/lib/Makefile b/contrib/ipfilter/lib/Makefile index d448ba0..a6e9cc4 100644 --- a/contrib/ipfilter/lib/Makefile +++ b/contrib/ipfilter/lib/Makefile @@ -68,6 +68,7 @@ LIBOBJS=$(DEST)/addicmp.o \ $(DEST)/printip.o \ $(DEST)/printpool.o \ $(DEST)/printpoolnode.o \ + $(DEST)/printproto.o \ $(DEST)/printfr.o \ $(DEST)/printfraginfo.o \ $(DEST)/printhostmap.o \ @@ -246,6 +247,8 @@ $(DEST)/printpool.o: $(LIBSRC)/printpool.c $(TOP)/ip_fil.h $(TOP)/ip_pool.h $(DEST)/printpoolnode.o: $(LIBSRC)/printpoolnode.c $(TOP)/ip_fil.h \ $(TOP)/ip_pool.h $(TOP)/ip_lookup.h $(CC) $(CCARGS) -c $(LIBSRC)/printpoolnode.c -o $@ +$(DEST)/printproto.o: $(LIBSRC)/printproto.c $(TOP)/ip_fil.h + $(CC) $(CCARGS) -c $(LIBSRC)/printproto.c -o $@ $(DEST)/printhostmap.o: $(LIBSRC)/printhostmap.c $(TOP)/ip_fil.h $(CC) $(CCARGS) -c $(LIBSRC)/printhostmap.c -o $@ $(DEST)/printifname.o: $(LIBSRC)/printifname.c $(INCDEP) diff --git a/contrib/ipfilter/lib/printproto.c b/contrib/ipfilter/lib/printproto.c new file mode 100644 index 0000000..dd0ce39 --- /dev/null +++ b/contrib/ipfilter/lib/printproto.c @@ -0,0 +1,51 @@ +/* + * Copyright (C) 1993-2005 by Darren Reed. + * + * See the IPFILTER.LICENCE file for details on licencing. + */ + +#include "ipf.h" + + +#if !defined(lint) +static const char rcsid[] = "@(#)$Id: printproto.c,v 1.1.2.1 2005/06/12 07:21:53 darrenr Exp $"; +#endif + + +void printproto(pr, p, np) +struct protoent *pr; +int p; +ipnat_t *np; +{ + if (np != NULL) { + if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP) + printf("tcp/udp"); + else if (np->in_flags & IPN_TCP) + printf("tcp"); + else if (np->in_flags & IPN_UDP) + printf("udp"); + else if (np->in_flags & IPN_ICMPQUERY) + printf("icmp"); +#ifdef _AIX51 + /* + * To make up for "ip = 252" and "hopopt = 0" in /etc/protocols + */ + else if (np->in_p == 0) + printf("ip"); +#endif + else if (pr != NULL) + printf("%s", pr->p_name); + else + printf("%d", np->in_p); + } else { +#ifdef _AIX51 + if (p == 0) + printf("ip"); + else +#endif + if (pr != NULL) + printf("%s", pr->p_name); + else + printf("%d", p); + } +} diff --git a/contrib/ipfilter/perl/ipf-mrtg.pl b/contrib/ipfilter/perl/ipf-mrtg.pl index a96a7cd..cce30ab 100644 --- a/contrib/ipfilter/perl/ipf-mrtg.pl +++ b/contrib/ipfilter/perl/ipf-mrtg.pl @@ -19,4 +19,4 @@ print "$in_pkts\n", my $uptime = `/usr/bin/uptime`; $uptime =~ /^\s+(\d{1,2}:\d{2}..)\s+up\s+(\d+)\s+(......),/; print "$2 $3\n", - "$firewall\n"; + "$firewall\n";
\ No newline at end of file diff --git a/contrib/ipfilter/perl/logfilter.pl b/contrib/ipfilter/perl/logfilter.pl index a75eafd..6ebe401 100644 --- a/contrib/ipfilter/perl/logfilter.pl +++ b/contrib/ipfilter/perl/logfilter.pl @@ -178,4 +178,4 @@ tcp 6667 irc.log tcp 7070 realaudio.log tcp 8080 http.log tcp 12345 netbus.log -udp 31337 backorifice.log +udp 31337 backorifice.log
\ No newline at end of file diff --git a/contrib/ipfilter/rules/example.1 b/contrib/ipfilter/rules/example.1 index 3da9f3c..ff93f49 100644 --- a/contrib/ipfilter/rules/example.1 +++ b/contrib/ipfilter/rules/example.1 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all incoming TCP packets on le0 from host 10.1.1.1 to any destination. # diff --git a/contrib/ipfilter/rules/example.10 b/contrib/ipfilter/rules/example.10 index f7a0b01..560d1e6 100644 --- a/contrib/ipfilter/rules/example.10 +++ b/contrib/ipfilter/rules/example.10 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # pass ack packets (ie established connection) # diff --git a/contrib/ipfilter/rules/example.11 b/contrib/ipfilter/rules/example.11 index 1cefa9a..c6b4e7f 100644 --- a/contrib/ipfilter/rules/example.11 +++ b/contrib/ipfilter/rules/example.11 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # allow any TCP packets from the same subnet as foo is on through to host # 10.1.1.2 if they are destined for port 6667. diff --git a/contrib/ipfilter/rules/example.12 b/contrib/ipfilter/rules/example.12 index 6dbaef5..c0ba1d3 100644 --- a/contrib/ipfilter/rules/example.12 +++ b/contrib/ipfilter/rules/example.12 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # get rid of all short IP fragments (too small for valid comparison) # diff --git a/contrib/ipfilter/rules/example.13 b/contrib/ipfilter/rules/example.13 index ca74114..854f07f 100644 --- a/contrib/ipfilter/rules/example.13 +++ b/contrib/ipfilter/rules/example.13 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # Log all short TCP packets to qe3, with 10.3.3.3 as the intended # destination for the packet. diff --git a/contrib/ipfilter/rules/example.2 b/contrib/ipfilter/rules/example.2 index 81e7d25..4f81725 100644 --- a/contrib/ipfilter/rules/example.2 +++ b/contrib/ipfilter/rules/example.2 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all outgoing TCP packets on le0 from any host to port 23 of # host 10.1.1.2 diff --git a/contrib/ipfilter/rules/example.3 b/contrib/ipfilter/rules/example.3 index c5b4344..cd31f73 100644 --- a/contrib/ipfilter/rules/example.3 +++ b/contrib/ipfilter/rules/example.3 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all inbound packets. # diff --git a/contrib/ipfilter/rules/example.4 b/contrib/ipfilter/rules/example.4 index f18dcdd..7918ec2 100644 --- a/contrib/ipfilter/rules/example.4 +++ b/contrib/ipfilter/rules/example.4 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all ICMP packets. # diff --git a/contrib/ipfilter/rules/example.5 b/contrib/ipfilter/rules/example.5 index 959dfb8..6d688b5 100644 --- a/contrib/ipfilter/rules/example.5 +++ b/contrib/ipfilter/rules/example.5 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # test ruleset # diff --git a/contrib/ipfilter/rules/example.6 b/contrib/ipfilter/rules/example.6 index e9ce23a..d40f0f3 100644 --- a/contrib/ipfilter/rules/example.6 +++ b/contrib/ipfilter/rules/example.6 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all TCP packets with only the SYN flag set (this is the first # packet sent to establish a connection) out of the SYN-ACK pair. diff --git a/contrib/ipfilter/rules/example.7 b/contrib/ipfilter/rules/example.7 index 0ddd7f7..062de98 100644 --- a/contrib/ipfilter/rules/example.7 +++ b/contrib/ipfilter/rules/example.7 @@ -1,4 +1,3 @@ -# $FreeBSD$ # block all ICMP packets. # block in proto icmp all diff --git a/contrib/ipfilter/rules/example.8 b/contrib/ipfilter/rules/example.8 index 2276b52..baa0258 100644 --- a/contrib/ipfilter/rules/example.8 +++ b/contrib/ipfilter/rules/example.8 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # block all incoming TCP connections but send back a TCP-RST for ones to # the ident port diff --git a/contrib/ipfilter/rules/example.9 b/contrib/ipfilter/rules/example.9 index 50bb46a..daff203 100644 --- a/contrib/ipfilter/rules/example.9 +++ b/contrib/ipfilter/rules/example.9 @@ -1,4 +1,3 @@ -# $FreeBSD$ # # drop all packets without IP security options # diff --git a/contrib/ipfilter/rules/example.sr b/contrib/ipfilter/rules/example.sr index 46fb6f1..c4c1994 100644 --- a/contrib/ipfilter/rules/example.sr +++ b/contrib/ipfilter/rules/example.sr @@ -1,4 +1,3 @@ -# $FreeBSD$ # # log all inbound packet on le0 which has IP options present # diff --git a/contrib/ipfilter/samples/ipfilter-pb.gif b/contrib/ipfilter/samples/ipfilter-pb.gif Binary files differindex f729ab1..afaefa8 100644 --- a/contrib/ipfilter/samples/ipfilter-pb.gif +++ b/contrib/ipfilter/samples/ipfilter-pb.gif diff --git a/contrib/ipfilter/test/Makefile b/contrib/ipfilter/test/Makefile index 7f17241..16535bf 100644 --- a/contrib/ipfilter/test/Makefile +++ b/contrib/ipfilter/test/Makefile @@ -11,7 +11,7 @@ all: results tests results: mkdir -p results -tests: ipf nat logtests ipv6 pools +tests: ipf nat logtests ipv6 pools bpf ipf: ftests ptests @@ -21,12 +21,13 @@ first: -mkdir -p results # Filtering tests -ftests: f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 +ftests: f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19 # Rule parsing tests -ptests: i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 +ptests: i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 \ + i20 i21 -ntests: n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 +ntests: n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14 nitests: ni1 ni2 ni3 ni4 ni5 ni6 ni7 ni8 ni9 ni10 ni11 ni12 ni13 ni14 ni15 ni16 @@ -40,16 +41,16 @@ ipv6: ipv6.1 ipv6.2 ipv6.3 bpf: bpf1 bpf-f1 -f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14: +f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f19: @/bin/sh ./dotest `awk "/^$@ / { print; } " test.format` -f15 f16 f17: +f15 f16 f17 f18: @/bin/sh ./mtest `awk "/^$@ / { print; } " test.format` -i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 bpf1: +i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 bpf1: @/bin/sh ./itest `awk "/^$@ / { print; } " test.format` -n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12: +n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14: @/bin/sh ./nattest `awk "/^$@ / { print; } " test.format` ni1 ni2 ni3 ni4 ni5 ni7 ni8 ni9 ni10 ni11 ni12 ni13 ni14 ni15 ni16: @@ -77,9 +78,9 @@ bpf-f1: /bin/sh ./bpftest `awk "/^$@ / { print; } " test.format` clean: - /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 - /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 - /bin/rm -f n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 + /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19 + /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 + /bin/rm -f n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12 n13 n14 /bin/rm -f ni1 ni2 ni3 ni4 ni5 ni6 ni7 ni8 ni9 /bin/rm -f ni10 ni11 ni12 ni13 ni14 ni15 ni16 /bin/rm -f in1 in2 in3 in4 in5 in6 diff --git a/contrib/ipfilter/test/dotest b/contrib/ipfilter/test/dotest index 71c8cce..72853d4 100644 --- a/contrib/ipfilter/test/dotest +++ b/contrib/ipfilter/test/dotest @@ -1,5 +1,8 @@ #!/bin/sh +thistest=$1 format=$2 +output=$3 +tuning=$4 if [ -f /usr/ucb/touch ] ; then TOUCH=/usr/ucb/touch else @@ -11,18 +14,21 @@ else fi fi fi -echo "$1..."; -/bin/cp /dev/null results/$1 +if [ "$tuning" != "" ] ; then + tuning="-T $tuning" +fi +echo "${thistest}..."; +/bin/cp /dev/null results/${thistest} ( while read rule; do - echo "$rule" | ../ipftest -F $format -Rbr - -i input/$1 >> results/$1; + echo "$rule" | ../ipftest -F $format -Rbr - -i input/${thistest} $tuning>> results/${thistest}; if [ $? -ne 0 ] ; then exit 1; fi - echo "--------" >> results/$1 -done ) < regress/$1 -cmp expected/$1 results/$1 + echo "--------" >> results/${thistest} +done ) < regress/${thistest} +cmp expected/${thistest} results/${thistest} status=$? if [ $status = 0 ] ; then - $TOUCH $1 + $TOUCH ${thistest} fi exit $status diff --git a/contrib/ipfilter/test/expected/bpf1 b/contrib/ipfilter/test/expected/bpf1 index 9d0ad1b..76381a7 100644 --- a/contrib/ipfilter/test/expected/bpf1 +++ b/contrib/ipfilter/test/expected/bpf1 @@ -1,4 +1,4 @@ -pass in bpf { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } -pass out bpf { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } -pass in bpf { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } -pass out bpf { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } +pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } +pass out bpf-v4 { "0 0 0 0 0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" } +pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } +pass out bpf-v4 { "0 0 0 0 0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" } diff --git a/contrib/ipfilter/test/expected/f13 b/contrib/ipfilter/test/expected/f13 index b3c7e54..2a0195b 100644 --- a/contrib/ipfilter/test/expected/f13 +++ b/contrib/ipfilter/test/expected/f13 @@ -1,6 +1,12 @@ pass nomatch nomatch +pass +nomatch +nomatch +nomatch +nomatch +nomatch nomatch nomatch nomatch @@ -15,6 +21,12 @@ nomatch block nomatch nomatch +block +nomatch +nomatch +nomatch +nomatch +nomatch nomatch nomatch nomatch @@ -39,6 +51,12 @@ nomatch nomatch nomatch pass +pass +pass +nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -53,8 +71,14 @@ nomatch nomatch nomatch block +block +block +nomatch +nomatch +nomatch +nomatch -------- -pass +block nomatch nomatch pass @@ -67,6 +91,12 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +pass +nomatch +pass +pass -------- block nomatch @@ -81,4 +111,50 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +block +nomatch +block +block +-------- +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +pass +pass +nomatch +nomatch +nomatch +nomatch +pass +pass +nomatch +nomatch +nomatch +nomatch +-------- +block +block +nomatch +pass +block +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +pass +nomatch +nomatch +pass -------- diff --git a/contrib/ipfilter/test/expected/f17 b/contrib/ipfilter/test/expected/f17 index 4fe3acf..c586e5b 100644 --- a/contrib/ipfilter/test/expected/f17 +++ b/contrib/ipfilter/test/expected/f17 @@ -3,4 +3,5 @@ block return-rst pass pass pass +pass -------- diff --git a/contrib/ipfilter/test/expected/f18 b/contrib/ipfilter/test/expected/f18 new file mode 100644 index 0000000..801abd3 --- /dev/null +++ b/contrib/ipfilter/test/expected/f18 @@ -0,0 +1,5 @@ +pass +pass +pass +pass +-------- diff --git a/contrib/ipfilter/test/expected/f19 b/contrib/ipfilter/test/expected/f19 new file mode 100644 index 0000000..5ee2e9d --- /dev/null +++ b/contrib/ipfilter/test/expected/f19 @@ -0,0 +1,10 @@ +pass +pass +pass +nomatch +-------- +pass +nomatch +nomatch +nomatch +-------- diff --git a/contrib/ipfilter/test/expected/f7 b/contrib/ipfilter/test/expected/f7 index 6aa7951..7a4daed 100644 --- a/contrib/ipfilter/test/expected/f7 +++ b/contrib/ipfilter/test/expected/f7 @@ -7,6 +7,12 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch -------- pass pass @@ -17,6 +23,12 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -27,6 +39,12 @@ block nomatch nomatch nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -37,6 +55,12 @@ pass nomatch nomatch nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -47,6 +71,28 @@ nomatch block block block +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +-------- +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +pass +pass +pass +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -54,7 +100,45 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch +pass +pass +nomatch +nomatch +nomatch +nomatch +-------- +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +pass pass +nomatch +nomatch +-------- +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch +nomatch pass pass -------- diff --git a/contrib/ipfilter/test/expected/f9 b/contrib/ipfilter/test/expected/f9 index 709744d..cc5be68 100644 --- a/contrib/ipfilter/test/expected/f9 +++ b/contrib/ipfilter/test/expected/f9 @@ -4,10 +4,16 @@ block block block block +block +block +block -------- nomatch nomatch nomatch +nomatch +nomatch +nomatch pass pass nomatch @@ -16,6 +22,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch block nomatch -------- @@ -23,6 +32,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch pass nomatch -------- @@ -32,6 +44,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -39,6 +54,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -46,6 +64,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -53,20 +74,29 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch +nomatch block nomatch nomatch nomatch nomatch +nomatch +nomatch -------- nomatch +nomatch pass nomatch nomatch nomatch nomatch +nomatch +nomatch -------- pass pass @@ -74,9 +104,15 @@ pass pass pass pass +pass +pass +pass -------- block block +block +nomatch +nomatch nomatch nomatch nomatch @@ -84,6 +120,9 @@ nomatch -------- pass pass +pass +nomatch +nomatch nomatch nomatch nomatch @@ -95,6 +134,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -102,6 +144,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -109,6 +154,9 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch @@ -116,10 +164,16 @@ nomatch nomatch nomatch nomatch +nomatch +nomatch +nomatch -------- nomatch nomatch nomatch +nomatch +nomatch +nomatch block block nomatch diff --git a/contrib/ipfilter/test/expected/i1 b/contrib/ipfilter/test/expected/i1 index 93530f9..c012af8 100644 --- a/contrib/ipfilter/test/expected/i1 +++ b/contrib/ipfilter/test/expected/i1 @@ -6,10 +6,12 @@ count in from any to any pass in from !any to any block in from any to !any pass in on ed0(!) from 127.0.0.1/32 to 127.0.0.1/32 +pass in on ed0(!),vx0(!) from 127.0.0.1/32 to 127.0.0.1/32 block in log first on lo0(!) from any to any pass in log body quick from any to any block return-rst in quick on le0(!) proto tcp from any to any block return-icmp in on qe0(!) from any to any block return-icmp(host-unr) in on qe0(!) from any to any +block return-icmp-as-dest in on le0(!) from any to any block return-icmp-as-dest(port-unr) in on qe0(!) from any to any pass out on longNICname0(!) from 254.220.186.152/32 to 254.220.186.152/32 diff --git a/contrib/ipfilter/test/expected/i11 b/contrib/ipfilter/test/expected/i11 index 058d03a..26b8b78 100644 --- a/contrib/ipfilter/test/expected/i11 +++ b/contrib/ipfilter/test/expected/i11 @@ -1,8 +1,10 @@ pass in on ed0(!) proto tcp from 127.0.0.1/32 to 127.0.0.1/32 port = 23 keep state -block in log first on lo0(!) proto tcp/udp from any to any keep state +block in log first on lo0(!) proto tcp/udp from any to any port = 7 keep state pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 20499 keep frags +pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 2049 keep frags (strict) pass in proto udp from 127.0.0.1/32 to 127.0.0.1/32 port = 53 keep state keep frags pass in on ed0(!) out-via vx0(!) proto udp from any to any keep state pass out on ppp0(!) in-via le0(!) proto tcp from any to any keep state +pass in on ed0(!),vx0(!) out-via vx0(!),ed0(!) proto udp from any to any keep state pass in proto tcp from any port > 1024 to 127.0.0.1/32 port = 1024 keep state pass in proto tcp from any to any flags S/FSRPAU keep state (limit 101,strict,newisn,no-icmp-err) diff --git a/contrib/ipfilter/test/expected/i12 b/contrib/ipfilter/test/expected/i12 index 22a3488..e21724c 100644 --- a/contrib/ipfilter/test/expected/i12 +++ b/contrib/ipfilter/test/expected/i12 @@ -13,14 +13,14 @@ pass in from 2.2.2.0/24 to 5.5.5.5/32 port = 25 pass in from 3.3.3.3/32 to 5.5.5.5/32 port = 25 pass in from 2.2.2.0/24 to 6.6.6.6/32 port = 25 pass in from 3.3.3.3/32 to 6.6.6.6/32 port = 25 -pass in proto tcp from 2.2.2.0/24 to 5.5.5.5/32 port = 53 -pass in proto tcp from 3.3.3.3/32 to 5.5.5.5/32 port = 53 -pass in proto tcp from 2.2.2.0/24 to 6.6.6.6/32 port = 53 -pass in proto tcp from 3.3.3.3/32 to 6.6.6.6/32 port = 53 -pass in proto tcp from 2.2.2.0/24 to 5.5.5.5/32 port = 9 -pass in proto tcp from 3.3.3.3/32 to 5.5.5.5/32 port = 9 -pass in proto tcp from 2.2.2.0/24 to 6.6.6.6/32 port = 9 -pass in proto tcp from 3.3.3.3/32 to 6.6.6.6/32 port = 9 +pass in proto tcp from 2.2.2.0/24 port = 53 to 5.5.5.5/32 +pass in proto tcp from 3.3.3.3/32 port = 53 to 5.5.5.5/32 +pass in proto tcp from 2.2.2.0/24 port = 9 to 5.5.5.5/32 +pass in proto tcp from 3.3.3.3/32 port = 9 to 5.5.5.5/32 +pass in proto tcp from 2.2.2.0/24 port = 53 to 6.6.6.6/32 +pass in proto tcp from 3.3.3.3/32 port = 53 to 6.6.6.6/32 +pass in proto tcp from 2.2.2.0/24 port = 9 to 6.6.6.6/32 +pass in proto tcp from 3.3.3.3/32 port = 9 to 6.6.6.6/32 pass in proto udp from 2.2.2.0/24 to 5.5.5.5/32 port = 53 pass in proto udp from 3.3.3.3/32 to 5.5.5.5/32 port = 53 pass in proto udp from 2.2.2.0/24 to 6.6.6.6/32 port = 53 @@ -32,3 +32,8 @@ pass in proto udp from 3.3.3.3/32 to 6.6.6.6/32 port = 9 pass in from 10.10.10.10/32 to 11.11.11.11/32 pass in from pool/101(!) to hash/202(!) pass in from hash/303(!) to pool/404(!) +table role = ipf type = tree number = + { ! 1.1.1.1/32; 2.2.2.2/32; ! 2.2.0.0/16; }; +table role = ipf type = tree number = + { 1.1.0.0/16; }; +pass in from pool/0(!) to pool/0(!) diff --git a/contrib/ipfilter/test/expected/i14 b/contrib/ipfilter/test/expected/i14 index 5a10155..08ba19a 100644 --- a/contrib/ipfilter/test/expected/i14 +++ b/contrib/ipfilter/test/expected/i14 @@ -6,3 +6,5 @@ block in on vm0(!) proto tcp/udp from any to any head 101 pass in proto tcp/udp from 1.1.1.1/32 to 2.2.2.2/32 group 101 pass in proto tcp from 1.0.0.1/32 to 2.0.0.2/32 group 101 pass in proto udp from 2.0.0.2/32 to 3.0.0.3/32 group 101 +block in on vm0(!) proto tcp/udp from any to any head vm0-group +pass in proto tcp/udp from 1.1.1.1/32 to 2.2.2.2/32 group vm0-group diff --git a/contrib/ipfilter/test/expected/i16 b/contrib/ipfilter/test/expected/i16 new file mode 100644 index 0000000..c5b3cf3 --- /dev/null +++ b/contrib/ipfilter/test/expected/i16 @@ -0,0 +1,3 @@ +block out all +100 pass in all +10101 pass out proto tcp from any to any diff --git a/contrib/ipfilter/test/expected/i17 b/contrib/ipfilter/test/expected/i17 new file mode 100644 index 0000000..bcc4d2d --- /dev/null +++ b/contrib/ipfilter/test/expected/i17 @@ -0,0 +1,10 @@ +List of active MAP/Redirect filters: + +List of active sessions: + +Hostmap table: +List of active state sessions: +List of configured pools +List of configured hash tables +List of groups configured (set 0) +List of groups configured (set 1) diff --git a/contrib/ipfilter/test/expected/i18 b/contrib/ipfilter/test/expected/i18 new file mode 100644 index 0000000..1aaa04f --- /dev/null +++ b/contrib/ipfilter/test/expected/i18 @@ -0,0 +1,10 @@ +pass in tos 0x50 from any to any +pass in tos 0x80 from any to any +pass in tos 0x28 from any to any +block in ttl 0 from any to any +block in ttl 1 from any to any +block in ttl 2 from any to any +block in ttl 3 from any to any +block in ttl 4 from any to any +block in ttl 5 from any to any +block in ttl 6 from any to any diff --git a/contrib/ipfilter/test/expected/i19 b/contrib/ipfilter/test/expected/i19 new file mode 100644 index 0000000..4ca19b5 --- /dev/null +++ b/contrib/ipfilter/test/expected/i19 @@ -0,0 +1,22 @@ +block in log level user.debug quick proto icmp from any to any +block in log level mail.info quick proto icmp from any to any +block in log level daemon.notice quick proto icmp from any to any +block in log level auth.warn quick proto icmp from any to any +block in log level syslog.err quick proto icmp from any to any +block in log level lpr.crit quick proto icmp from any to any +block in log level news.alert quick proto icmp from any to any +block in log level uucp.emerg quick proto icmp from any to any +block in log level cron.debug quick proto icmp from any to any +block in log level ftp.info quick proto icmp from any to any +block in log level authpriv.notice quick proto icmp from any to any +block in log level !!!.warn quick proto icmp from any to any +block in log level local0.err quick proto icmp from any to any +block in log level local1.crit quick proto icmp from any to any +block in log level local2.alert quick proto icmp from any to any +block in log level local3.emerg quick proto icmp from any to any +block in log level local4.debug quick proto icmp from any to any +block in log level local5.info quick proto icmp from any to any +block in log level local6.notice quick proto icmp from any to any +block in log level local7.warn quick proto icmp from any to any +block in log level kern.err quick proto icmp from any to any +block in log level !!!.emerg quick proto icmp from any to any diff --git a/contrib/ipfilter/test/expected/i2 b/contrib/ipfilter/test/expected/i2 index 37ec9c4..5ff18f4 100644 --- a/contrib/ipfilter/test/expected/i2 +++ b/contrib/ipfilter/test/expected/i2 @@ -5,3 +5,4 @@ block in proto ipv6 from any to any block in proto udp from any to any block in proto 250 from any to any pass in proto tcp/udp from any to any +block in proto tcp/udp from any to any diff --git a/contrib/ipfilter/test/expected/i20 b/contrib/ipfilter/test/expected/i20 new file mode 100644 index 0000000..77eabdb --- /dev/null +++ b/contrib/ipfilter/test/expected/i20 @@ -0,0 +1,4 @@ +pass in on ppp0(!) from ppp0/peer to ppp0/32 +block in on hme0(!) from any to hme0/bcast +pass in on bge0(!) from bge0/net to bge0/32 +block in on eri0(!) from any to eri0/netmasked diff --git a/contrib/ipfilter/test/expected/i21 b/contrib/ipfilter/test/expected/i21 new file mode 100644 index 0000000..a5f55b3 --- /dev/null +++ b/contrib/ipfilter/test/expected/i21 @@ -0,0 +1,10 @@ +pass in from any port = 10101 to any +pass out from any to any port != 22 +block in from any port 20:21 to any +block out from any to any port 10 <> 100 +pass out from any to any port = 3 +pass out from any to any port = 5 +pass out from any to any port = 7 +pass out from any to any port = 9 +block in from any port = 20 to any +block in from any port = 25 to any diff --git a/contrib/ipfilter/test/expected/i4 b/contrib/ipfilter/test/expected/i4 index 89c0995..639dae8 100644 --- a/contrib/ipfilter/test/expected/i4 +++ b/contrib/ipfilter/test/expected/i4 @@ -5,4 +5,5 @@ pass in proto udp from 127.0.0.1/32 port > 32000 to 127.0.0.1/32 port < 29000 block in proto udp from any port != 123 to any port < 7 block in proto tcp from any port = 25 to any port > 25 pass in proto tcp/udp from any port 1 >< 3 to any port 1 <> 3 +pass in proto tcp/udp from any port 2:2 to any port 10:20 pass in log first quick proto tcp from any port > 1023 to any port = 1723 flags S/FSRPAU keep state diff --git a/contrib/ipfilter/test/expected/i6 b/contrib/ipfilter/test/expected/i6 index 40fe185..e4b14c3 100644 --- a/contrib/ipfilter/test/expected/i6 +++ b/contrib/ipfilter/test/expected/i6 @@ -7,4 +7,6 @@ pass in on le0(!) dup-to qe0(!):127.0.0.1 to hme0(!):10.1.1.1 from 127.0.0.1/32 block in quick on qe0(!) to qe1(!) from any to any block in quick to qe1(!) from any to any pass out quick dup-to hme0(!) from any to any +pass out quick on hme0(!) reply-to hme1(!) from any to any +pass in on le0(!) dup-to qe0(!):127.0.0.1 reply-to hme1(!):10.10.10.10 all pass in quick fastroute all diff --git a/contrib/ipfilter/test/expected/i7 b/contrib/ipfilter/test/expected/i7 index c46364b..309cd28 100644 --- a/contrib/ipfilter/test/expected/i7 +++ b/contrib/ipfilter/test/expected/i7 @@ -2,3 +2,8 @@ pass in on ed0(!) proto tcp from 127.0.0.1/32 to 127.0.0.1/32 port = 23 flags S/ block in on lo0(!) proto tcp from any to any flags A/FSRPAU pass in on lo0(!) proto tcp from any to any flags /SPA block in on lo0(!) proto tcp from any to any flags C/A +pass in on lo0(!) proto tcp from any to any flags S/SA +block in on lo0(!) proto tcp from any to any flags S/SA +pass in on lo0(!) proto tcp from any to any flags S/FSRPAU +block in on lo0(!) proto tcp from any to any flags /A +pass in on lo0(!) proto tcp from any to any flags S/SA diff --git a/contrib/ipfilter/test/expected/i8 b/contrib/ipfilter/test/expected/i8 index 77dc177..5533a7d 100644 --- a/contrib/ipfilter/test/expected/i8 +++ b/contrib/ipfilter/test/expected/i8 @@ -1,2 +1,33 @@ pass in proto icmp from 127.0.0.1/32 to 127.0.0.1/32 icmp-type timest block in proto icmp from any to any icmp-type unreach code 1 +pass in proto icmp from any to any icmp-type unreach code 15 +pass in proto icmp from any to any icmp-type unreach code 13 +pass in proto icmp from any to any icmp-type unreach code 8 +pass in proto icmp from any to any icmp-type unreach code 4 +pass in proto icmp from any to any icmp-type unreach code 9 +pass in proto icmp from any to any icmp-type unreach code 11 +pass in proto icmp from any to any icmp-type unreach code 14 +pass in proto icmp from any to any icmp-type unreach code 10 +pass in proto icmp from any to any icmp-type unreach code 12 +pass in proto icmp from any to any icmp-type unreach code 7 +pass in proto icmp from any to any icmp-type unreach code 1 +pass in proto icmp from any to any icmp-type unreach code 6 +pass in proto icmp from any to any icmp-type unreach code 0 +pass in proto icmp from any to any icmp-type unreach code 3 +pass in proto icmp from any to any icmp-type unreach code 2 +pass in proto icmp from any to any icmp-type unreach code 5 +pass in proto icmp from any to any icmp-type echo +pass in proto icmp from any to any icmp-type echorep +pass in proto icmp from any to any icmp-type inforeq +pass in proto icmp from any to any icmp-type inforep +pass in proto icmp from any to any icmp-type maskrep +pass in proto icmp from any to any icmp-type maskreq +pass in proto icmp from any to any icmp-type paramprob +pass in proto icmp from any to any icmp-type redir +pass in proto icmp from any to any icmp-type unreach +pass in proto icmp from any to any icmp-type routerad +pass in proto icmp from any to any icmp-type routersol +pass in proto icmp from any to any icmp-type squench +pass in proto icmp from any to any icmp-type timest +pass in proto icmp from any to any icmp-type timestrep +pass in proto icmp from any to any icmp-type timex diff --git a/contrib/ipfilter/test/expected/i9 b/contrib/ipfilter/test/expected/i9 index bae7c9b..bb4e54f 100644 --- a/contrib/ipfilter/test/expected/i9 +++ b/contrib/ipfilter/test/expected/i9 @@ -3,5 +3,10 @@ block in from any to any with ipopts pass in from any to any with opt nop,rr,zsu pass in from any to any with opt nop,rr,zsu not opt lsrr,ssrr pass in from 127.0.0.1/32 to 127.0.0.1/32 with not frag +pass in from 127.0.0.1/32 to 127.0.0.1/32 with frag,frag-body pass in proto tcp from any to any flags S/FSRPAU with not oow keep state pass in proto tcp from any to any flags S/FSRPAU with not bad,bad-src,bad-nat +block in quick from any to any with not nat +block in quick from any to any with not lowttl +pass in from any to any with mbcast,not bcast,mcast,not state +pass in from any to any with opt mtup,mtur,encode,ts,tr,sec,e-sec,cipso,satid,ssrr,addext,visa,imitd,eip,finn,dps,sdb,nsapa,rtralrt,ump diff --git a/contrib/ipfilter/test/expected/in1 b/contrib/ipfilter/test/expected/in1 index ce5a610..8c47a92 100644 --- a/contrib/ipfilter/test/expected/in1 +++ b/contrib/ipfilter/test/expected/in1 @@ -3,6 +3,8 @@ map le0 0.0.0.1/32 -> 0.0.0.1/32 map le0 128.0.0.0/1 -> 0.0.0.0/0 map le0 10.0.0.0/8 -> 1.2.3.0/24 map le0 10.0.0.0/8 -> 1.2.3.0/24 +map le0 10.0.0.0/8 -> 1.2.3.0/24 +map le0 0.0.0.5/0.0.0.255 -> 1.2.3.0/24 map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp 10000:19999 map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap udp 20000:29999 @@ -25,3 +27,4 @@ map ppp0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp 10000:19999 frag age 30/30 map fxp0 from 192.168.0.0/18 to any port = 21 -> 1.2.3.4/32 proxy port 21 ftp/tcp map thisisalonginte 0.0.0.0/0 -> 0.0.0.0/32 mssclamp 1452 tag freddyliveshere map bar0 0.0.0.0/0 -> 0.0.0.0/32 icmpidmap icmp 1000:2000 +map ppp0,adsl0 0.0.0.0/0 -> 0.0.0.0/32 diff --git a/contrib/ipfilter/test/expected/in2 b/contrib/ipfilter/test/expected/in2 index 61c0d18..1dc7b68 100644 --- a/contrib/ipfilter/test/expected/in2 +++ b/contrib/ipfilter/test/expected/in2 @@ -2,7 +2,10 @@ rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 tcp rdr le0 9.8.7.6/32 -> 1.1.1.1 ip rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp rdr le0 9.8.7.6/32 -> 1.1.1.1 ip +rdr le0 9.0.0.0/8 -> 1.1.1.1 ip +rdr le0 9.8.0.0/16 -> 1.1.1.1 ip rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp +rdr le0 9.8.7.6/32 port 80 -> 0.0.0.0/0 port 80 tcp rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 udp rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp/udp rdr le0 9.8.7.6/32 -> 1.1.1.1 icmp @@ -11,7 +14,7 @@ rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag rdr le0 9.8.7.6/32 -> 1.1.1.1 icmp frag -rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp frag +rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp/udp frag rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin frag rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin frag rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag age 10/10 @@ -65,3 +68,4 @@ rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port 5555 tcp rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port = 5555 tcp rdr le0 0.0.0.0/0 -> 254.220.186.152 ip rdr le0 0.0.0.0/0 -> 254.220.186.152,254.220.186.152 ip +rdr adsl0,ppp0 0.0.0.0/0 port 25 -> 127.0.0.1 port 25 tcp diff --git a/contrib/ipfilter/test/expected/in5 b/contrib/ipfilter/test/expected/in5 index 7b3120a..f371b35 100644 --- a/contrib/ipfilter/test/expected/in5 +++ b/contrib/ipfilter/test/expected/in5 @@ -1,3 +1,4 @@ +map le0 from 9.8.7.6/32 port > 1024 to any -> 1.1.1.1/32 portmap tcp 10000:20000 rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 tcp rdr le0 from any to 9.8.7.6/32 -> 1.1.1.1 ip rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp diff --git a/contrib/ipfilter/test/expected/in6 b/contrib/ipfilter/test/expected/in6 index 08bbff0..338bd80 100644 --- a/contrib/ipfilter/test/expected/in6 +++ b/contrib/ipfilter/test/expected/in6 @@ -1,3 +1,7 @@ map foo0 from any port = 1 to any port != 0 -> 0.0.0.0/32 udp +map foo0 from any port = 1 to any port != 0 -> 0.0.0.0/32 udp +map foo0 from any port < 1 to any port > 0 -> 0.0.0.0/32 tcp map foo0 from any port < 1 to any port > 0 -> 0.0.0.0/32 tcp map foo0 from any port <= 1 to any port >= 0 -> 0.0.0.0/32 tcp/udp +map foo0 from any port <= 1 to any port >= 0 -> 0.0.0.0/32 tcp/udp +map foo0 from any port 1 >< 20 to any port 20 <> 40 -> 0.0.0.0/32 tcp/udp diff --git a/contrib/ipfilter/test/expected/n1 b/contrib/ipfilter/test/expected/n1 index 0f87034..537f9bb 100644 --- a/contrib/ipfilter/test/expected/n1 +++ b/contrib/ipfilter/test/expected/n1 @@ -1,105 +1,105 @@ -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.2.2.2 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.2.2.2 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.1.1.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.4 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.2.2.2 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.2.2.2 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.1.1.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.4 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 ------------------------------- -ip 20(20) 255 10.3.4.5 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.3.4.5 > 10.1.1.1 -ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.0 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 48(20) 1 10.3.4.5 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.4 -ip 48(20) 1 10.4.3.2 > 10.1.1.1 -ip 20(20) 34 10.3.4.5 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.3.4.5 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.1.1.2 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.3.4.5 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 20(20) 255 10.3.4.5 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.5 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.0 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 48(20) 1 10.3.4.5 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.4 +ip #0 48(20) 1 10.4.3.2 > 10.1.1.1 +ip #0 20(20) 34 10.3.4.5 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.3.4.5 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.1.1.2 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.3.4.5 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 ------------------------------- -ip 20(20) 255 10.3.4.1 > 10.1.1.2 -ip 20(20) 255 10.3.4.2 > 10.1.1.2 -ip 20(20) 255 10.3.4.3 > 10.1.1.1 -ip 40(20) 6 10.3.4.3,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.3,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.3.4.3 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.2 -ip 48(20) 1 10.4.3.2 > 10.1.1.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.4 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.3.4.3 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.3.4.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.3.4.4 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.3.4.4 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 20(20) 255 10.3.4.1 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.2 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.3 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.3,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.3,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.3.4.3 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.2 +ip #0 48(20) 1 10.4.3.2 > 10.1.1.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.4 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.3.4.3 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.3.4.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.3.4.4 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.3.4.4 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n11 b/contrib/ipfilter/test/expected/n11 index 3732709..5257a64 100644 --- a/contrib/ipfilter/test/expected/n11 +++ b/contrib/ipfilter/test/expected/n11 @@ -1,51 +1,51 @@ -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 1.6.7.8 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 1.6.7.8 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 ------------------------------- -ip 20(20) 255 10.2.2.2 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.2.2.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.1.1.0 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.0 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 20(20) 255 10.2.2.2 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.2.2.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.1.1.0 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.0 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 ------------------------------- -ip 20(20) 255 10.3.4.0 > 10.1.1.2 -ip 20(20) 255 10.3.4.1 > 10.1.1.2 -ip 20(20) 255 10.3.4.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.1.1.5 -ip 20(20) 255 10.1.1.1 > 10.1.1.5 -ip 20(20) 255 10.1.1.2 > 10.1.1.5 +ip #0 20(20) 255 10.3.4.0 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.1 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.5 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.5 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.5 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n13 b/contrib/ipfilter/test/expected/n13 new file mode 100644 index 0000000..bfe2018 --- /dev/null +++ b/contrib/ipfilter/test/expected/n13 @@ -0,0 +1,5 @@ +ip #0 20(20) 0 203.1.1.23 > 150.1.1.1 +ip #0 20(20) 0 203.1.1.23 > 150.1.1.2 +ip #0 20(20) 0 203.1.1.24 > 150.1.1.2 +ip #0 20(20) 0 203.1.1.25 > 150.1.1.1 +------------------------------- diff --git a/contrib/ipfilter/test/expected/n14 b/contrib/ipfilter/test/expected/n14 new file mode 100644 index 0000000..4669300 --- /dev/null +++ b/contrib/ipfilter/test/expected/n14 @@ -0,0 +1,5 @@ +ip #0 40(20) 6 10.2.2.5,2000 > 10.1.1.254,80 +ip #0 40(20) 6 10.2.2.6,2000 > 10.1.1.253,80 +ip #0 40(20) 6 10.2.2.7,2000 > 10.1.1.254,80 +ip #0 40(20) 6 10.2.2.5,2001 > 10.1.1.254,80 +------------------------------- diff --git a/contrib/ipfilter/test/expected/n2 b/contrib/ipfilter/test/expected/n2 index dc70138..827272e 100644 --- a/contrib/ipfilter/test/expected/n2 +++ b/contrib/ipfilter/test/expected/n2 @@ -1,80 +1,80 @@ -ip 40(20) 6 10.2.2.2,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.2.2.2,10001 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 -ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 -ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 -ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.2.2.2,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.2.2.2,10001 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 -ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 -ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 -ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10001 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10003 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80 -ip 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80 -ip 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80 -ip 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10003 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80 +ip #0 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80 +ip #0 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80 +ip #0 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40001 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.5,40000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40001 > 10.1.2.1,80 -ip 40(20) 6 10.3.4.5,40000 > 10.1.3.1,80 -ip 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80 -ip 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.1.1.3,2000 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.5,40000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.2.1,80 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.3.1,80 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.1.1.3,2000 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n3 b/contrib/ipfilter/test/expected/n3 index 03c0717..0e019ae 100644 --- a/contrib/ipfilter/test/expected/n3 +++ b/contrib/ipfilter/test/expected/n3 @@ -1,12 +1,12 @@ -ip 40(20) 6 192.168.2.1,1488 > 203.1.1.1,80 -ip 40(20) 6 192.168.2.1,1276 > 203.1.1.1,80 -ip 40(20) 6 192.168.2.1,1032 > 203.1.1.1,80 -ip 28(20) 17 192.168.2.1,1032 > 203.1.1.1,80 -ip 40(20) 6 192.168.2.1,65299 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.2.1,1488 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.2.1,1276 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.2.1,1032 > 203.1.1.1,80 +ip #0 28(20) 17 192.168.2.1,1032 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.2.1,65299 > 203.1.1.1,80 ------------------------------- -ip 40(20) 6 192.168.1.1,1488 > 203.1.1.1,80 -ip 40(20) 6 192.168.1.1,1276 > 203.1.1.1,80 -ip 40(20) 6 192.168.1.0,1032 > 203.1.1.1,80 -ip 28(20) 17 192.168.1.0,1032 > 203.1.1.1,80 -ip 40(20) 6 192.168.1.255,65299 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.1.1,1488 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.1.1,1276 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.1.0,1032 > 203.1.1.1,80 +ip #0 28(20) 17 192.168.1.0,1032 > 203.1.1.1,80 +ip #0 40(20) 6 192.168.1.255,65299 > 203.1.1.1,80 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n4 b/contrib/ipfilter/test/expected/n4 index 8cdf78c..9349542 100644 --- a/contrib/ipfilter/test/expected/n4 +++ b/contrib/ipfilter/test/expected/n4 @@ -1,66 +1,66 @@ -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 ------------------------------- -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 ------------------------------- -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.2.2.1,10023 -ip 40(20) 6 10.1.0.0,23 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.1.1.1,23 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.2.2.1,10023 +ip #0 40(20) 6 10.1.0.0,23 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 ------------------------------- -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053 -ip 28(20) 17 10.1.1.0,53 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053 +ip #0 28(20) 17 10.1.1.0,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.1,53 > 10.3.3.3,12345 ------------------------------- -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 -ip 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 +ip #0 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345 ------------------------------- -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 -ip 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 -ip 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 -ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,53 -ip 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 -ip 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 +ip #0 40(20) 6 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12346 > 10.1.0.0,23 +ip #0 40(20) 6 10.2.2.1,10023 > 10.3.3.3,12346 +ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,53 +ip #0 28(20) 17 10.2.2.1,10053 > 10.3.3.3,12345 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,53 +ip #0 40(20) 6 10.1.1.0,53 > 10.3.3.3,12345 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n5 b/contrib/ipfilter/test/expected/n5 index 521c737..0e578b6 100644 --- a/contrib/ipfilter/test/expected/n5 +++ b/contrib/ipfilter/test/expected/n5 @@ -1,330 +1,330 @@ -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.2.2.2 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.2.2.2 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.1.1.1 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.2.2.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.2.2.2,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.2.2.2 > 10.1.2.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 -ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 -ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 -ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.2.2.2,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.2.2.2,1025 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.2.2.2 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.2.2.2 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.1.1.1 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.2.2.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.2.2.2,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.2.2.2 > 10.1.2.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.2.2.2,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.2.2.2,1025 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 20(20) 255 10.3.4.5 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.3.4.5 > 10.1.1.1 -ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.0 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 48(20) 1 10.1.1.1 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.3.4.5 > 10.1.1.2 -ip 20(20) 0 10.3.4.5 > 10.1.2.1 -ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.5,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,2000 > 10.1.2.1,80 -ip 40(20) 6 10.3.4.5,2001 > 10.1.3.1,80 -ip 40(20) 6 10.3.4.5,2002 > 10.1.4.1,80 -ip 40(20) 6 10.3.4.5,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.3.4.5 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.3.4.5 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.0 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 48(20) 1 10.1.1.1 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.3.4.5 > 10.1.1.2 +ip #0 20(20) 0 10.3.4.5 > 10.1.2.1 +ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.5,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.3.4.5,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.3.4.5,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.3.4.5,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.3.4.1 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.3.4.1 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.3.4.1 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.3.4.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.3.4.2 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 -ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 -ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 -ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.3.4.3,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.3.4.3,1025 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.3.4.3,1025 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.3.4.1 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.3.4.1 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.3.4.1 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.3.4.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.3.4.2 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.3,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.3.4.3,1025 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.3.4.3,1025 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.1.1.1 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 -ip 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 -ip 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 -ip 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.3.4.5,10001 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.1.1.1 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.2,1026 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.5,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.1.1.3,2000 > 10.1.2.1,80 +ip #0 40(20) 6 10.1.1.3,2001 > 10.1.3.1,80 +ip #0 40(20) 6 10.1.1.3,2002 > 10.1.4.1,80 +ip #0 40(20) 6 10.1.1.3,2003 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.3.4.5,10001 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.1.1.1 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10003 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80 -ip 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80 -ip 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80 -ip 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.3.4.1,10009 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.3.4.1,10010 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 -ip 28(20) 17 10.3.4.1,10011 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.3.4.1,10012 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.1.1.1 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.3.4.1,10002 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10003 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10001 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.1,10004 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.1,10005 > 10.1.2.1,80 +ip #0 40(20) 6 10.3.4.1,10006 > 10.1.3.1,80 +ip #0 40(20) 6 10.3.4.1,10007 > 10.1.4.1,80 +ip #0 40(20) 6 10.3.4.1,10008 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.1,10009 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.3.4.1,10010 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,40000 +ip #0 28(20) 17 10.3.4.1,10011 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.3.4.1,10012 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- -ip 20(20) 255 10.1.1.0 > 10.1.1.2 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 -ip 20(20) 255 10.2.2.1 > 10.1.2.1 -ip 20(20) 255 10.2.2.2 > 10.1.2.1 -ip 20(20) 255 10.1.1.1 > 10.1.1.2 -ip 20(20) 255 10.1.1.2 > 10.1.1.1 -ip 20(20) 255 10.2.2.1 > 10.2.1.1 -ip 20(20) 255 10.2.2.2 > 10.2.1.1 -ip 20(20) 255 10.2.2.3 > 10.1.1.1 -ip 20(20) 255 10.2.3.4 > 10.2.2.2 -ip 20(20) 255 10.1.1.1 > 10.2.2.2 -ip 20(20) 255 10.1.1.2 > 10.2.2.2 -ip 20(20) 255 10.1.1.0 > 10.3.4.5 -ip 20(20) 255 10.1.1.1 > 10.3.4.5 -ip 20(20) 255 10.1.1.2 > 10.3.4.5 -ip 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 -ip 48(20) 1 10.1.1.1 > 10.4.3.2 -ip 48(20) 1 10.4.3.2 > 10.2.2.2 -ip 48(20) 1 10.4.3.2 > 10.3.4.3 -ip 48(20) 1 10.4.3.2 > 10.3.4.5 -ip 20(20) 34 10.1.1.2 > 10.4.3.2 -ip 20(20) 34 10.4.3.2 > 10.3.4.4 -ip 20(20) 34 10.1.1.2 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.5 -ip 20(20) 34 10.1.1.3 > 10.4.3.4 -ip 20(20) 34 10.4.3.4 > 10.3.4.6 -ip 20(20) 35 10.1.1.3 > 10.4.3.4 -ip 20(20) 35 10.4.3.4 > 10.3.4.7 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40000 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.0 > 10.1.1.2 -ip 20(20) 0 10.1.1.1 > 10.1.2.1 -ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 -ip 28(20) 17 10.3.4.5,40001 > 10.1.1.1,1025 -ip 40(20) 6 10.3.4.5,40000 > 10.1.2.1,80 -ip 40(20) 6 10.3.4.5,40001 > 10.1.3.1,80 -ip 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80 -ip 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80 -ip 20(20) 0 10.1.1.1 > 10.1.1.2 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 20(20) 0 10.1.1.2 > 10.1.1.1 -ip 40(20) 6 10.3.4.5,40000 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 -ip 40(20) 6 10.3.4.5,40001 > 10.3.4.5,40000 -ip 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 -ip 28(20) 17 10.3.4.5,40000 > 10.3.4.5,40001 -ip 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 -ip 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 20(20) 255 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 +ip #0 20(20) 255 10.2.2.1 > 10.1.2.1 +ip #0 20(20) 255 10.2.2.2 > 10.1.2.1 +ip #0 20(20) 255 10.1.1.1 > 10.1.1.2 +ip #0 20(20) 255 10.1.1.2 > 10.1.1.1 +ip #0 20(20) 255 10.2.2.1 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.2 > 10.2.1.1 +ip #0 20(20) 255 10.2.2.3 > 10.1.1.1 +ip #0 20(20) 255 10.2.3.4 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.1 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.2 > 10.2.2.2 +ip #0 20(20) 255 10.1.1.0 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.1 > 10.3.4.5 +ip #0 20(20) 255 10.1.1.2 > 10.3.4.5 +ip #0 40(20) 6 10.1.1.1,1025 > 10.3.4.5,1025 +ip #0 48(20) 1 10.1.1.1 > 10.4.3.2 +ip #0 48(20) 1 10.4.3.2 > 10.2.2.2 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.3 +ip #0 48(20) 1 10.4.3.2 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.2 +ip #0 20(20) 34 10.4.3.2 > 10.3.4.4 +ip #0 20(20) 34 10.1.1.2 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.5 +ip #0 20(20) 34 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 34 10.4.3.4 > 10.3.4.6 +ip #0 20(20) 35 10.1.1.3 > 10.4.3.4 +ip #0 20(20) 35 10.4.3.4 > 10.3.4.7 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.0 > 10.1.1.2 +ip #0 20(20) 0 10.1.1.1 > 10.1.2.1 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.1.1,1025 +ip #0 28(20) 17 10.3.4.5,40001 > 10.1.1.1,1025 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.2.1,80 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.3.1,80 +ip #0 40(20) 6 10.3.4.5,40000 > 10.1.4.1,80 +ip #0 40(20) 6 10.3.4.5,40001 > 10.1.4.1,80 +ip #0 20(20) 0 10.1.1.1 > 10.1.1.2 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 20(20) 0 10.1.1.2 > 10.1.1.1 +ip #0 40(20) 6 10.3.4.5,40000 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1026 > 10.3.4.5,40000 +ip #0 40(20) 6 10.3.4.5,40001 > 10.3.4.5,40000 +ip #0 40(20) 6 10.1.1.1,1025 > 10.1.1.2,1025 +ip #0 28(20) 17 10.3.4.5,40000 > 10.3.4.5,40001 +ip #0 28(20) 17 10.1.1.2,1025 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 +ip #0 40(20) 6 10.1.2.1,80 > 10.3.4.5,40001 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n6 b/contrib/ipfilter/test/expected/n6 index d28d4f1..2b2c37f 100644 --- a/contrib/ipfilter/test/expected/n6 +++ b/contrib/ipfilter/test/expected/n6 @@ -1,70 +1,70 @@ -ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 -ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 +ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 ------------------------------- -ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 -ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 +ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 ------------------------------- -ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 -ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 +ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 ------------------------------- -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 -ip 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 -ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 -ip 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.2.2.1,10023 +ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 ------------------------------- -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 -ip 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 -ip 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 -ip 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 -ip 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 -ip 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053 -ip 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 -ip 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.1.2.2,23 +ip #0 40(20) 6 10.3.0.1,12345 > 10.2.2.2,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.1,53 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.0.0,23 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.0.0,23 +ip #0 28(20) 17 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 28(20) 17 10.3.3.3,12345 > 10.2.2.1,10053 +ip #0 40(20) 6 10.2.2.2,12345 > 10.1.1.0,53 +ip #0 40(20) 6 10.3.3.3,12345 > 10.1.1.0,53 ------------------------------- diff --git a/contrib/ipfilter/test/expected/n7 b/contrib/ipfilter/test/expected/n7 index db8bb50..eb23534 100644 --- a/contrib/ipfilter/test/expected/n7 +++ b/contrib/ipfilter/test/expected/n7 @@ -1,30 +1,30 @@ -ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 -ip 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023 -ip 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10050 -ip 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10079 -ip 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80 -ip 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80 -ip 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80 -ip 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80 -ip 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80 +ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 +ip #0 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10050 +ip #0 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10079 +ip #0 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80 +ip #0 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80 +ip #0 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80 +ip #0 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80 +ip #0 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80 ------------------------------- -ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 -ip 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023 -ip 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10023 -ip 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10023 -ip 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80 -ip 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80 -ip 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80 -ip 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80 -ip 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80 +ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 +ip #0 40(20) 6 10.2.3.1,1231 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.3.1,1232 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.3.1,1233 > 10.2.2.1,10023 +ip #0 40(20) 6 10.2.3.1,1234 > 10.1.1.1,80 +ip #0 40(20) 6 10.2.3.1,1235 > 10.1.1.2,80 +ip #0 40(20) 6 10.2.3.1,1236 > 10.1.1.3,80 +ip #0 40(20) 6 10.2.3.1,1237 > 10.1.1.4,80 +ip #0 40(20) 6 10.2.3.1,1238 > 10.1.1.4,80 ------------------------------- -ip 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 -ip 40(20) 6 10.2.3.1,1231 > 10.1.1.1,23 -ip 40(20) 6 10.2.3.1,1232 > 10.1.1.1,50 -ip 40(20) 6 10.2.3.1,1233 > 10.1.1.1,79 -ip 40(20) 6 10.2.3.1,1234 > 10.2.2.1,3128 -ip 40(20) 6 10.2.3.1,1235 > 1.2.2.129,3128 -ip 40(20) 6 10.2.3.1,1236 > 10.2.2.1,3128 -ip 40(20) 6 10.2.3.1,1237 > 1.2.2.129,3128 -ip 40(20) 6 10.2.3.1,1238 > 10.2.2.1,3128 +ip #0 40(20) 6 10.2.3.1,1230 > 10.1.1.1,22 +ip #0 40(20) 6 10.2.3.1,1231 > 10.1.1.1,23 +ip #0 40(20) 6 10.2.3.1,1232 > 10.1.1.1,50 +ip #0 40(20) 6 10.2.3.1,1233 > 10.1.1.1,79 +ip #0 40(20) 6 10.2.3.1,1234 > 10.2.2.1,3128 +ip #0 40(20) 6 10.2.3.1,1235 > 1.2.2.129,3128 +ip #0 40(20) 6 10.2.3.1,1236 > 10.2.2.1,3128 +ip #0 40(20) 6 10.2.3.1,1237 > 1.2.2.129,3128 +ip #0 40(20) 6 10.2.3.1,1238 > 10.2.2.1,3128 ------------------------------- diff --git a/contrib/ipfilter/test/expected/p1 b/contrib/ipfilter/test/expected/p1 index c3f7afa..9f02804 100644 --- a/contrib/ipfilter/test/expected/p1 +++ b/contrib/ipfilter/test/expected/p1 @@ -9,6 +9,8 @@ nomatch List of active MAP/Redirect filters: List of active sessions: + +Hostmap table: List of active state sessions: List of configured pools table role = ipf type = tree number = 100 diff --git a/contrib/ipfilter/test/expected/p2 b/contrib/ipfilter/test/expected/p2 index bb15bdf..2f330c2 100644 --- a/contrib/ipfilter/test/expected/p2 +++ b/contrib/ipfilter/test/expected/p2 @@ -1,4 +1,4 @@ -nomatch +block nomatch pass nomatch @@ -9,10 +9,15 @@ pass List of active MAP/Redirect filters: List of active sessions: + +Hostmap table: List of active state sessions: List of configured pools List of configured hash tables # 'anonymous' table +table role = ipf type = hash number = 2147483650 size = 3 + { 4.4.0.0/16; 127.0.0.1/32; }; +# 'anonymous' table table role = ipf type = hash number = 2147483649 size = 3 { 4.4.0.0/16; 127.0.0.1/32; }; List of groups configured (set 0) diff --git a/contrib/ipfilter/test/expected/p3 b/contrib/ipfilter/test/expected/p3 index 136543f..94fde9e 100644 --- a/contrib/ipfilter/test/expected/p3 +++ b/contrib/ipfilter/test/expected/p3 @@ -13,6 +13,8 @@ block List of active MAP/Redirect filters: List of active sessions: + +Hostmap table: List of active state sessions: List of configured pools List of configured hash tables diff --git a/contrib/ipfilter/test/input/f13 b/contrib/ipfilter/test/input/f13 index 0ca607e..d7b0724 100644 --- a/contrib/ipfilter/test/input/f13 +++ b/contrib/ipfilter/test/input/f13 @@ -1,51 +1,94 @@ -# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF,MF,FO=0 SYN +# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF,FO=0 SYN +[in] 4500 0028 0001 4000 3f06 36cc 0101 0101 0201 0101 -0401 0019 0000 0000 0000 0000 50 02 2000 86c5 0000 +0401 0019 0000 0000 0000 0000 50 02 2000 86bb 0000 # 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP MF ACK +[in] 4500 0024 0002 2000 3f06 56cf 0101 0101 0201 0101 0401 0019 0000 0000 0000 0000 5010 2000 # 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP FO=2 ACK +[in] 4500 002c 0002 0002 3f06 76c5 0101 0101 0201 0101 0000 0000 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f 1011 1213 -# 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 SYN +# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF MF FO=0 SYN +[in] 4500 0028 0003 6000 3f06 16ca 0101 0101 0201 0101 -0401 0019 0000 0000 0000 0000 5010 2000 0000 0000 +0400 0019 7000 0000 0000 0000 5002 2000 0000 0000 # 1.1.1.1,1025 -> 2.1.1.1,25 TTL=63 TCP DF FO=0 +[in] 4500 001c 0004 6000 3f06 16d5 0101 0101 0201 0101 0401 0019 0000 0000 # 1.1.1.1 -> 2.1.1.1 TTL=63 TCP DF FO=1 SYN +[in] 4500 001c 0005 6001 3f06 16d3 0101 0101 0201 0101 0000 0000 5010 2000 # 1.1.1.1 -> 2.1.1.1 TTL=63 UDP DF MF FO=0 +[in] 4500 0014 0006 6000 3f11 16d0 0101 0101 0201 0101 # 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0 +[in] 4500 0018 0007 2000 3f11 56cb 0101 0101 0201 0101 0035 0035 # 1.1.1.1,53 -> 2.1.1.1,53 TTL=63 UDP MF FO=0 +[in] 4500 001c 0008 2000 3f11 56c6 0101 0101 0201 0101 0035 0035 0004 0000 # 1.1.1.1,53 -> 2.1.1.1,54 TTL=63 UDP MF FO=0 (short) +[in] 4500 0018 0008 2000 3f11 56ca 0101 0101 0201 0101 0035 0036 # 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 UDP MF FO=0 +[in] 4500 001c 0008 2000 3f11 56c6 0101 0101 0201 0101 0015 0036 0004 0000 # 1.1.1.1,21 -> 2.1.1.1,54 TTL=63 TCP MF FO=0 +[in] 4500 001c 0008 2000 3f06 56d1 0101 0101 0201 0101 0015 0036 0000 0000 0000 0000 50 02 2000 0000 0000 +# 1.1.1.1 -> 2.1.1.1 TTL=63 UDP FO=3 +[in] +4500 001c 0008 0003 3f11 76c3 0101 0101 0201 0101 +0000 0000 0000 0000 + # 1.1.1.1 -> 2.1.1.1 TTL=63 UDP FO=1 +[in] 4500 001c 0008 0001 3f11 76c5 0101 0101 0201 0101 0000 0000 0000 0000 +# 2.1.1.1,53 -> 1.1.1.1,53 TTL=63 UDP +[out] +4500 001c 0008 0000 3f11 76c6 0201 0101 0101 0101 +0035 0035 0004 0000 + +# 2.1.1.1,25 -> 1.1.1.1,1014 TTL=63 TCP DF SYN-ACK +[out] +4500 0028 0003 4000 3f06 36ca 0201 0101 0101 0101 +0019 0400 0000 0001 7000 0001 5012 2000 16b4 0000 + +# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK (OOW) +[in] +4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101 +0400 0019 0040 0000 0000 0000 5010 2000 8678 0000 + +# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK +[in] +4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101 +0400 0019 7000 0004 0000 0002 5010 2000 16b2 0000 + +# 1.1.1.1,1024 -> 2.1.1.1,25 TTL=63 TCP DF ACK +[in] +4500 0028 0003 4000 3f06 36ca 0101 0101 0201 0101 +0400 0019 7000 0001 0000 0002 5010 2000 16b5 0000 + diff --git a/contrib/ipfilter/test/input/f17 b/contrib/ipfilter/test/input/f17 index 18af566..a0d44d7 100644 --- a/contrib/ipfilter/test/input/f17 +++ b/contrib/ipfilter/test/input/f17 @@ -1,28 +1,39 @@ +# TCP 1.1.1.1,54076 -> 2.2.2.2,27 SYN [out,ppp0] 4500 003c 8262 0000 4006 f254 0101 0101 0202 0202 d33c 0019 bfd0 8989 0000 0000 a002 4000 cfcd 0000 0204 05b4 0103 0300 0101 080a 008e 17f7 0000 0000 +# TCP 2.2.2.2,27 -> 1.1.1.1,54076 ACK [in,ppp0] 4500 003c 8262 0000 1106 2155 0202 0202 0101 0101 0019 d33c 4020 3436 bfdf cbc9 5010 4000 694a 0000 0204 0584 0103 0300 0101 080a 008e 17f7 0000 0000 +# TCP 1.1.1.1,54076 -> 2.2.2.2,27 SYN [out,ppp0] 4500 003c 8265 0000 4006 f251 0101 0101 0202 0202 d33c 0019 bfd0 8989 0000 0000 a002 4000 cfc2 0000 0204 05b4 0103 0300 0101 080a 008e 1802 0000 0000 +# TCP 2.2.2.2,27 -> 1.1.1.1,54076 SYN-ACK [in,ppp0] 4500 002c 7442 4000 2906 d784 0202 0202 0101 0101 0019 d33c ed67 4d4e bfd0 898a 6012 2118 19c2 0000 0204 0584 +# TCP 1.1.1.1,54076 -> 2.2.2.2,27 ACK [out,ppp0] -4500 002c 8262 0000 4006 f264 0101 0101 +4500 0028 8262 0000 4006 f268 0101 0101 0202 0202 d33c 0019 bfd0 898a ed67 4d4e -5010 4000 0ce0 0000 0000 +5010 4000 1268 0000 + +# TCP 2.2.2.2,27 -> 1.1.1.1,54076 ACK+data +[in,ppp0] +4500 002a 7442 4000 2906 d786 0202 0202 +0101 0101 0019 d33c ed67 4d4e bfd0 8990 +5012 2118 2f43 0000 0203 diff --git a/contrib/ipfilter/test/input/f18 b/contrib/ipfilter/test/input/f18 new file mode 100644 index 0000000..9ecbb7f --- /dev/null +++ b/contrib/ipfilter/test/input/f18 @@ -0,0 +1,4 @@ +in on le1 1.1.1.1 3.3.3.3 +in on le1 1.1.1.1 5.5.5.5 +out on le1 2.2.2.2 4.4.4.4 +out on le1 2.2.2.2 6.6.6.6 diff --git a/contrib/ipfilter/test/input/f19 b/contrib/ipfilter/test/input/f19 new file mode 100644 index 0000000..6cab988 --- /dev/null +++ b/contrib/ipfilter/test/input/f19 @@ -0,0 +1,4 @@ +in tcp 127.0.0.1,1 127.0.0.1,21 S +in tcp 127.0.0.1,2 127.0.0.1,21 S +in tcp 127.0.0.1,3 127.0.0.1,21 S +in tcp 127.0.0.1,4 127.0.0.1,21 S diff --git a/contrib/ipfilter/test/input/f7 b/contrib/ipfilter/test/input/f7 index 2721af2..dbc9e33 100644 --- a/contrib/ipfilter/test/input/f7 +++ b/contrib/ipfilter/test/input/f7 @@ -7,3 +7,9 @@ in icmp 1.1.1.1 2.1.1.1 unreach,3 in icmp 1.1.1.1 2.1.1.1 echorep in icmp 1.1.1.1 2.1.1.1 echorep,1 in icmp 1.1.1.1 2.1.1.1 echorep,3 +in icmp 2.2.2.2 3.3.3.3 maskreq +out icmp 3.3.3.3 2.2.2.2 maskrep +in icmp 4.4.4.4 5.5.5.5 timest +out icmp 5.5.5.5 4.4.4.4 timestrep +in icmp 6.6.6.6 7.7.7.7 inforeq +out icmp 7.7.7.7 6.6.6.6 inforep diff --git a/contrib/ipfilter/test/input/f9 b/contrib/ipfilter/test/input/f9 index 33f3be3..e64e299 100644 --- a/contrib/ipfilter/test/input/f9 +++ b/contrib/ipfilter/test/input/f9 @@ -1,6 +1,9 @@ in 1.1.1.1 2.1.1.1 opt lsrr +in 1.1.1.1 2.1.1.1 opt lsrr=1.1.1.1 in 1.1.1.1 2.1.1.1 opt lsrr,ssrr in 1.1.1.1 2.1.1.1 opt ts +in 1.1.1.1 2.1.1.1 opt satid +in 1.1.1.1 2.1.1.1 opt satid=234 in 1.1.1.1 2.1.1.1 opt sec-class=topsecret in 1.1.1.1 2.1.1.1 opt ssrr,sec-class=topsecret in 1.1.1.1 2.1.1.1 opt sec diff --git a/contrib/ipfilter/test/input/n13 b/contrib/ipfilter/test/input/n13 new file mode 100644 index 0000000..ac7bbbd --- /dev/null +++ b/contrib/ipfilter/test/input/n13 @@ -0,0 +1,4 @@ +out on le0 192.168.1.1 150.1.1.1 +out on le0 192.168.1.1 150.1.1.2 +out on le0 192.168.1.2 150.1.1.2 +out on le0 192.168.1.3 150.1.1.1 diff --git a/contrib/ipfilter/test/input/n14 b/contrib/ipfilter/test/input/n14 new file mode 100644 index 0000000..969eb1c --- /dev/null +++ b/contrib/ipfilter/test/input/n14 @@ -0,0 +1,4 @@ +in on gre0 tcp 10.2.2.5,2000 203.1.1.1,80 +in on gre0 tcp 10.2.2.6,2000 203.1.1.1,80 +in on gre0 tcp 10.2.2.7,2000 203.1.1.1,80 +in on gre0 tcp 10.2.2.5,2001 203.1.1.1,80 diff --git a/contrib/ipfilter/test/input/ni17 b/contrib/ipfilter/test/input/ni17 new file mode 100644 index 0000000..f9dec94 --- /dev/null +++ b/contrib/ipfilter/test/input/ni17 @@ -0,0 +1,6 @@ +in on le0 tcp 10.2.2.5,2000 203.1.1.1,80 +in on le0 tcp 10.2.2.6,2000 203.1.1.1,80 +in on le0 tcp 10.2.2.7,2000 203.1.1.1,80 +in on le0 tcp 10.2.2.7,2001 203.1.1.1,80 +in on le0 tcp 10.2.2.8,2000 203.1.1.1,80 +in on le0 tcp 10.2.2.9,2000 203.1.1.1,80 diff --git a/contrib/ipfilter/test/itest b/contrib/ipfilter/test/itest index 333afde..8fefc63 100644 --- a/contrib/ipfilter/test/itest +++ b/contrib/ipfilter/test/itest @@ -13,7 +13,14 @@ else fi echo "$1..."; /bin/cp /dev/null results/$1 -../ipf -Rnvf regress/$1 2>/dev/null > results/$1 +case $3 in +ipf) + ../ipf -Rnvf regress/$1 2>/dev/null > results/$1 + ;; +ipftest) + ../ipftest -D -r regress/$1 -i /dev/null > results/$1 + ;; +esac cmp expected/$1 results/$1 status=$? if [ $status = 0 ] ; then diff --git a/contrib/ipfilter/test/natipftest b/contrib/ipfilter/test/natipftest index f5cfdb8..abdc760 100755 --- a/contrib/ipfilter/test/natipftest +++ b/contrib/ipfilter/test/natipftest @@ -27,7 +27,7 @@ single) echo "$1..."; /bin/cp /dev/null results/$1 ( while read rule; do - echo "$rule" | ../ipftest -R $format -bx -r regress/$1.ipf -N - -i input/$1 >> \ + echo "$rule" | ../ipftest -R $format -b -r regress/$1.ipf -N - -i input/$1 >> \ results/$1; if [ $? -ne 0 ] ; then exit 1; @@ -43,7 +43,7 @@ single) multi) echo "$1..."; /bin/cp /dev/null results/$1 - ../ipftest -R $format -bx -r regress/$1.ipf -N regress/$1.nat \ + ../ipftest -R $format -b -r regress/$1.ipf -N regress/$1.nat \ -i input/$1 >> results/$1; if [ $? -ne 0 ] ; then exit 2; diff --git a/contrib/ipfilter/test/regress/bpf1 b/contrib/ipfilter/test/regress/bpf1 index 2c80283..5d83b77 100644 --- a/contrib/ipfilter/test/regress/bpf1 +++ b/contrib/ipfilter/test/regress/bpf1 @@ -1,4 +1,4 @@ pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } -pass out bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } +pass out bpf-v4 { "src host 1.1.1.1" } pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } -pass out bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } +pass out bpf-v4 { "dst host 1.1.1.1" } diff --git a/contrib/ipfilter/test/regress/f13 b/contrib/ipfilter/test/regress/f13 index f123e47..8106419 100644 --- a/contrib/ipfilter/test/regress/f13 +++ b/contrib/ipfilter/test/regress/f13 @@ -4,3 +4,5 @@ pass in proto udp from any to any port = 53 keep frags block in proto udp from any to any port = 53 keep frags pass in proto tcp from any to any port = 25 flags S/SA keep state keep frags block in proto tcp from any to any port = 25 flags S/SA keep state keep frags +pass in proto udp from any to any port = 53 keep frags(strict) +pass in proto tcp from any to any port = 25 keep state(strict) diff --git a/contrib/ipfilter/test/regress/f18 b/contrib/ipfilter/test/regress/f18 new file mode 100644 index 0000000..acba2b3 --- /dev/null +++ b/contrib/ipfilter/test/regress/f18 @@ -0,0 +1,4 @@ +pass in from 1.1.1.1 to any +pass out from 2.2.2.2 to any +count in from 1.1.1.1 to 3.3.3.3 +count out from 2.2.2.2 to 4.4.4.4 diff --git a/contrib/ipfilter/test/regress/f19 b/contrib/ipfilter/test/regress/f19 new file mode 100644 index 0000000..d7770b8 --- /dev/null +++ b/contrib/ipfilter/test/regress/f19 @@ -0,0 +1,2 @@ +pass in quick proto tcp all flags S keep state +pass in quick proto tcp all flags S keep state(limit 1) diff --git a/contrib/ipfilter/test/regress/f7 b/contrib/ipfilter/test/regress/f7 index 6848a68..be1b969 100644 --- a/contrib/ipfilter/test/regress/f7 +++ b/contrib/ipfilter/test/regress/f7 @@ -4,3 +4,6 @@ block in proto icmp from any to any icmp-type unreach code 3 pass in proto icmp from any to any icmp-type unreach code 3 block in proto icmp from any to any icmp-type echorep pass in proto icmp from any to any icmp-type echorep +pass in proto icmp all icmp-type maskreq keep state +pass in proto icmp all icmp-type timest keep state +pass in proto icmp all icmp-type inforeq keep state diff --git a/contrib/ipfilter/test/regress/i1 b/contrib/ipfilter/test/regress/i1 index df60d2b..c86c320 100644 --- a/contrib/ipfilter/test/regress/i1 +++ b/contrib/ipfilter/test/regress/i1 @@ -7,10 +7,12 @@ count in from any to any pass in from !any to any block in from any to !any pass in on ed0 from localhost to localhost +pass in on ed0,vx0 from localhost to localhost block in log first on lo0 from any to any pass in log body quick from any to any block return-rst in quick on le0 proto tcp from any to any block return-icmp in on qe0 from any to any block return-icmp(1) in on qe0 from any to any +block return-icmp-as-dest in on le0 from any to any block return-icmp-as-dest(port-unr) in on qe0 from any to any pass out on longNICname0 from test.host.dots to test\.host.dots diff --git a/contrib/ipfilter/test/regress/i11 b/contrib/ipfilter/test/regress/i11 index 2999a85..89b3589 100644 --- a/contrib/ipfilter/test/regress/i11 +++ b/contrib/ipfilter/test/regress/i11 @@ -1,8 +1,10 @@ pass in on ed0 proto tcp from localhost to localhost port = telnet keep state -block in log first on lo0 proto tcp/udp from any to any keep state +block in log first on lo0 proto tcp/udp from any to any port = echo keep state pass in proto udp from localhost to localhost port = 20499 keep frag +pass in proto udp from localhost to localhost port = 2049 keep frag(strict) pass in proto udp from localhost to localhost port = 53 keep state keep frags pass in on ed0 out-via vx0 proto udp from any to any keep state pass out on ppp0 in-via le0 proto tcp from any to any keep state +pass in on ed0,vx0 out-via vx0,ed0 proto udp from any to any keep state pass in proto tcp from any port gt 1024 to localhost port eq 1024 keep state pass in proto tcp all flags S keep state(strict,newisn,no-icmp-err,limit 101) diff --git a/contrib/ipfilter/test/regress/i12 b/contrib/ipfilter/test/regress/i12 index b8b2f3e..5342702 100644 --- a/contrib/ipfilter/test/regress/i12 +++ b/contrib/ipfilter/test/regress/i12 @@ -2,8 +2,9 @@ pass in from 1.1.1.1/32 to 2.2.2.2/32 pass in from (2.2.2.2/24,3.3.3.3/32) to 4.4.4.4/32 pass in from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) pass in from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (22,25) -pass in proto tcp from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (53,9) +pass in proto tcp from (2.2.2.2/24,3.3.3.3/32) port = (53,9) to (5.5.5.5/32,6.6.6.6/32) pass in proto udp from (2.2.2.2/24,3.3.3.3/32) to (5.5.5.5/32,6.6.6.6/32) port = (53,9) pass in from 10.10.10.10 to 11.11.11.11 pass in from pool/101 to hash/202 pass in from hash/303 to pool/404 +pass in from pool=(!1.1.1.1,2.2.2.2,!2.2.0.0/16) to pool = ( 1.1.0.0/16 ) diff --git a/contrib/ipfilter/test/regress/i14 b/contrib/ipfilter/test/regress/i14 index 3c9d7b8..2cd2613 100644 --- a/contrib/ipfilter/test/regress/i14 +++ b/contrib/ipfilter/test/regress/i14 @@ -6,3 +6,5 @@ block in on vm0 proto tcp/udp all head 101 pass in from 1.1.1.1 to 2.2.2.2 group 101 pass in proto tcp from 1.0.0.1 to 2.0.0.2 group 101 pass in proto udp from 2.0.0.2 to 3.0.0.3 group 101 +block in on vm0 proto tcp/udp all head vm0-group +pass in from 1.1.1.1 to 2.2.2.2 group vm0-group diff --git a/contrib/ipfilter/test/regress/i16 b/contrib/ipfilter/test/regress/i16 new file mode 100644 index 0000000..5c9144a --- /dev/null +++ b/contrib/ipfilter/test/regress/i16 @@ -0,0 +1,3 @@ +0 block out all +100 pass in all +10101 pass out proto tcp all diff --git a/contrib/ipfilter/test/regress/i17 b/contrib/ipfilter/test/regress/i17 new file mode 100644 index 0000000..a995ae5 --- /dev/null +++ b/contrib/ipfilter/test/regress/i17 @@ -0,0 +1,11 @@ +100 pass in all +200 pass in proto tcp all +110 pass in proto udp all +110 pass in from localhost to any +pass in all +pass in from localhost to any +@0 100 pass in from localhost to any +@1 pass in from any to localhost +@0 pass in from 1.1.1.1 to any +@1 110 pass in from 2.2.2.2 to any +@2 pass in from 3.3.3.3 to any diff --git a/contrib/ipfilter/test/regress/i18 b/contrib/ipfilter/test/regress/i18 new file mode 100644 index 0000000..c2845d1 --- /dev/null +++ b/contrib/ipfilter/test/regress/i18 @@ -0,0 +1,2 @@ +pass in tos (80,0x80,40) all +block in ttl (0,1,2,3,4,5,6) all diff --git a/contrib/ipfilter/test/regress/i19 b/contrib/ipfilter/test/regress/i19 new file mode 100644 index 0000000..a09fd56 --- /dev/null +++ b/contrib/ipfilter/test/regress/i19 @@ -0,0 +1,22 @@ +block in quick log level user.debug proto icmp all +block in quick log level mail.info proto icmp all +block in quick log level daemon.notice proto icmp all +block in quick log level auth.warn proto icmp all +block in quick log level syslog.err proto icmp all +block in quick log level lpr.crit proto icmp all +block in quick log level news.alert proto icmp all +block in quick log level uucp.emerg proto icmp all +block in quick log level cron.debug proto icmp all +block in quick log level ftp.info proto icmp all +block in quick log level authpriv.notice proto icmp all +block in quick log level logalert.warn proto icmp all +block in quick log level local0.err proto icmp all +block in quick log level local1.crit proto icmp all +block in quick log level local2.alert proto icmp all +block in quick log level local3.emerg proto icmp all +block in quick log level local4.debug proto icmp all +block in quick log level local5.info proto icmp all +block in quick log level local6.notice proto icmp all +block in quick log level local7.warn proto icmp all +block in quick log level kern.err proto icmp all +block in quick log level security.emerg proto icmp all diff --git a/contrib/ipfilter/test/regress/i2 b/contrib/ipfilter/test/regress/i2 index a3b9cd8..50f6107 100644 --- a/contrib/ipfilter/test/regress/i2 +++ b/contrib/ipfilter/test/regress/i2 @@ -5,3 +5,4 @@ block in proto ipv6 from any to any block in proto 17 from any to any block in proto 250 from any to any pass in proto tcp/udp from any to any +block in proto tcp-udp from any to any diff --git a/contrib/ipfilter/test/regress/i20 b/contrib/ipfilter/test/regress/i20 new file mode 100644 index 0000000..99039ee --- /dev/null +++ b/contrib/ipfilter/test/regress/i20 @@ -0,0 +1,4 @@ +pass in on ppp0 from ppp0/peer to ppp0/32 +block in on hme0 from any to hme0/broadcast +pass in on bge0 from bge0/network to bge0/32 +block in on eri0 from any to eri0/netmasked diff --git a/contrib/ipfilter/test/regress/i21 b/contrib/ipfilter/test/regress/i21 new file mode 100644 index 0000000..bf797f9 --- /dev/null +++ b/contrib/ipfilter/test/regress/i21 @@ -0,0 +1,6 @@ +pass in from port = 10101 +pass out from any to port != 22 +block in from port 20:21 +block out from any to port 10 <> 100 +pass out from any to port = (3,5,7,9) +block in from port = (20,25) diff --git a/contrib/ipfilter/test/regress/i4 b/contrib/ipfilter/test/regress/i4 index 7170dc2..8551f76 100644 --- a/contrib/ipfilter/test/regress/i4 +++ b/contrib/ipfilter/test/regress/i4 @@ -5,4 +5,5 @@ pass in proto 17 from localhost port > 32000 to localhost port < 29000 block in proto udp from any port != \ntp to any port < echo block in proto tcp from any port = smtp to any port > 25 pass in proto tcp/udp from any port 1 >< 3 to any port 1 <> 3 +pass in proto tcp/udp from any port 2:2 to any port 10:20 pass in log first quick proto tcp from any port > 1023 to any port = 1723 flags S keep state diff --git a/contrib/ipfilter/test/regress/i6 b/contrib/ipfilter/test/regress/i6 index 1a53089..0b371bd 100644 --- a/contrib/ipfilter/test/regress/i6 +++ b/contrib/ipfilter/test/regress/i6 @@ -7,4 +7,6 @@ pass in on le0 to hme0:10.1.1.1 dup-to qe0:127.0.0.1 from localhost to localhost block in quick on qe0 to qe1 from any to any block in quick to qe1 from any to any pass out quick dup-to hme0 from any to any +pass out quick on hme0 reply-to hme1 from any to any +pass in on le0 dup-to qe0:127.0.0.1 reply-to hme1:10.10.10.10 all pass in quick fastroute all diff --git a/contrib/ipfilter/test/regress/i7 b/contrib/ipfilter/test/regress/i7 index 4f3328d..1a82940 100644 --- a/contrib/ipfilter/test/regress/i7 +++ b/contrib/ipfilter/test/regress/i7 @@ -2,3 +2,8 @@ pass in on ed0 proto tcp from localhost to localhost port = 23 flags S/SA block in on lo0 proto tcp from any to any flags A pass in on lo0 proto tcp from any to any flags /SAP block in on lo0 proto tcp from any to any flags 0x80/A +pass in on lo0 proto tcp from any to any flags S/18 +block in on lo0 proto tcp from any to any flags 2/18 +pass in on lo0 proto tcp from any to any flags 2 +block in on lo0 proto tcp from any to any flags /16 +pass in on lo0 proto tcp from any to any flags 2/SA diff --git a/contrib/ipfilter/test/regress/i8 b/contrib/ipfilter/test/regress/i8 index bde6ed5..cc984b2 100644 --- a/contrib/ipfilter/test/regress/i8 +++ b/contrib/ipfilter/test/regress/i8 @@ -1,2 +1,31 @@ pass in proto icmp from localhost to localhost icmp-type timest block in proto icmp from any to any icmp-type unreach code 1 +pass in proto icmp all icmp-type unreach code cutoff-preced +pass in proto icmp all icmp-type unreach code filter-prohib +pass in proto icmp all icmp-type unreach code isolate +pass in proto icmp all icmp-type unreach code needfrag +pass in proto icmp all icmp-type unreach code net-prohib +pass in proto icmp all icmp-type unreach code net-tos +pass in proto icmp all icmp-type unreach code host-preced +pass in proto icmp all icmp-type unreach code host-prohib +pass in proto icmp all icmp-type unreach code host-tos +pass in proto icmp all icmp-type unreach code host-unk +pass in proto icmp all icmp-type unreach code host-unr +pass in proto icmp all icmp-type unreach code (net-unk,net-unr) +pass in proto icmp all icmp-type unreach code port-unr +pass in proto icmp all icmp-type unreach code proto-unr +pass in proto icmp all icmp-type unreach code srcfail +pass in proto icmp all icmp-type (echo,echorep) +pass in proto icmp all icmp-type inforeq +pass in proto icmp all icmp-type inforep +pass in proto icmp all icmp-type maskrep +pass in proto icmp all icmp-type maskreq +pass in proto icmp all icmp-type paramprob +pass in proto icmp all icmp-type redir +pass in proto icmp all icmp-type unreach +pass in proto icmp all icmp-type routerad +pass in proto icmp all icmp-type routersol +pass in proto icmp all icmp-type squench +pass in proto icmp all icmp-type timest +pass in proto icmp all icmp-type timestrep +pass in proto icmp all icmp-type timex diff --git a/contrib/ipfilter/test/regress/i9 b/contrib/ipfilter/test/regress/i9 index 2b8fb10..a966bed 100644 --- a/contrib/ipfilter/test/regress/i9 +++ b/contrib/ipfilter/test/regress/i9 @@ -2,6 +2,11 @@ pass in from localhost to localhost with short,frags block in from any to any with ipopts pass in from any to any with opt nop,rr,zsu pass in from any to any with opt nop,rr,zsu not opt ssrr,lsrr -pass in from localhost to localhost with not frag +pass in from localhost to localhost and not frag +pass in from localhost to localhost with frags,frag-body pass in proto tcp all flags S with not oow keep state pass in proto tcp all flags S with not bad,bad-src,bad-nat +block in quick all with not nat +block in quick all with not lowttl +pass in all with mbcast,not bcast,multicast,not state +pass in from any to any with opt mtur,mtup,encode,ts,tr,sec,cipso,satid,ssrr,visa,imitd,eip,finn,dps,sdb,nsapa,rtralrt,ump,addext,e-sec diff --git a/contrib/ipfilter/test/regress/in1 b/contrib/ipfilter/test/regress/in1 index 145e3d0..163d834 100644 --- a/contrib/ipfilter/test/regress/in1 +++ b/contrib/ipfilter/test/regress/in1 @@ -3,14 +3,16 @@ map le0 1/32 -> 1/32 map le0 128.0.0.0/1 -> 0/0 map le0 10.0.0.0/8 -> 1.2.3.0/24 map le0 10.0.0.5/8 -> 1.2.3.4/24 +map le0 10.0.0.5/0xff000000 -> 1.2.3.4/24 +map le0 10.0.0.5/0xff -> 1.2.3.4/24 map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 map ppp0 192.168.0.0/16 -> 0/32 portmap tcp 10000:19999 map ppp0 192.168.0.0/16 -> 0/32 portmap udp 20000:29999 map ppp0 192.168.0.0/16 -> 0/32 portmap tcp/udp 30000:39999 map ppp0 192.168.0.0/16 -> 0/32 portmap tcp auto map ppp0 192.168.0.0/16 -> 0/32 portmap udp auto -map ppp0 192.168.0.0/16 -> 0/32 portmap tcp/udp auto -map ppp0 192.168.0.0/16 -> 0/32 proxy port ftp ftp/tcp +map ppp0 192.168.0.0/16 -> 0/32 portmap tcpudp auto +map ppp0 192.168.0.0/16 -> 0/32 proxy port ftp ftp/6 map ppp0 192.168.0.0/16 -> 0/32 proxy port 1010 ftp/tcp map le0 0/0 -> 0/32 frag map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 frag @@ -25,3 +27,4 @@ map ppp0 192.168.0.0/16 -> 0/32 portmap tcp 10000:19999 frag age 30 map fxp0 from 192.168.0.0/18 to 0/0 port = 21 -> 1.2.3.4/32 proxy port 21 ftp/tcp map thisisalonginte 0/0 -> 0/32 mssclamp 1452 tag freddyliveshere map bar0 0/0 -> 0/32 icmpidmap icmp 1000:2000 +map ppp0,adsl0 0/0 -> 0/32 diff --git a/contrib/ipfilter/test/regress/in2 b/contrib/ipfilter/test/regress/in2 index 222a28c..4a86de7 100644 --- a/contrib/ipfilter/test/regress/in2 +++ b/contrib/ipfilter/test/regress/in2 @@ -2,7 +2,10 @@ rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 tcp rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 ip rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp rdr le0 9.8.7.6/32 -> 1.1.1.1 ip +rdr le0 9.8.7.6/0xff000000 -> 1.1.1.1 ip +rdr le0 9.8.7.6/0xffff0000 -> 1.1.1.1 ip rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp +rdr le0 9.8.7.6/32 port 80 -> 0/0 port 80 tcp rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 udp rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp/udp rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 icmp @@ -11,7 +14,7 @@ rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin rdr le0 9.8.7.6/32 port 0 -> 1.1.1.1 port 0 ip frag rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 icmp frag -rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp frag +rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcpudp frag rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1 port 80 tcp round-robin frag rdr le0 9.8.7.6/32 port 80 -> 1.1.1.1,1.1.1.2 port 80 tcp round-robin frag rdr le0 9.8.7.6/32 -> 1.1.1.1 ip frag age 10 @@ -65,3 +68,4 @@ rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port 5555 tcp rdr le0 9.8.7.6/32 port 1000-2000 -> 1.1.1.1 port = 5555 tcp rdr le0 0/0 -> test.host.dots rdr le0 0/0 -> test.host.dots,test.host.dots +rdr adsl0,ppp0 0/0 port 25 -> 127.0.0.1 port 25 diff --git a/contrib/ipfilter/test/regress/in5 b/contrib/ipfilter/test/regress/in5 index d0a115c..c539b03 100644 --- a/contrib/ipfilter/test/regress/in5 +++ b/contrib/ipfilter/test/regress/in5 @@ -1,9 +1,10 @@ +map le0 from 9.8.7.6/32 port > 1024 to any -> 1.1.1.1 portmap 10000:20000 tcp rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 tcp -rdr le0 from any to 9.8.7.6/32 port = 0 -> 1.1.1.1 port 0 ip -rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp -rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 ip -rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp -rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 udp +rdr le0 from any to 9.8.7.6/0xffffffff port = 0 -> 1.1.1.1 port 0 ip +rdr le0 from any to 9.8.7.6 port = 8888 -> 1.1.1.1 port 888 tcp +rdr le0 from any to 9.8.7.6/255.255.255.255 port = 8888 -> 1.1.1.1 port 888 ip +rdr le0 from any to 9.8.7.6 mask 0xffffffff port = 8888 -> 1.1.1.1 port 888 tcp +rdr le0 from any to 9.8.7.6 mask 255.255.255.255 port = 8888 -> 1.1.1.1 port 888 udp rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1 port 888 tcp/udp rdr le0 from any to 9.8.7.6/32 -> 1.1.1.1 port 888 icmp rdr le0 from any to 9.8.7.6/32 port = 8888 -> 1.1.1.1,1.1.1.2 port 888 tcp diff --git a/contrib/ipfilter/test/regress/in6 b/contrib/ipfilter/test/regress/in6 index 6948799..932df9b 100644 --- a/contrib/ipfilter/test/regress/in6 +++ b/contrib/ipfilter/test/regress/in6 @@ -1,3 +1,7 @@ map foo0 from any port = 1 to any port != 0 -> 0/32 udp +map foo0 from any port eq 1 to any port ne 0 -> 0/32 udp map foo0 from any port < 1 to any port > 0 -> 0/32 tcp +map foo0 from any port lt 1 to any port gt 0 -> 0/32 tcp map foo0 from any port <= 1 to any port >= 0 -> 0/32 tcp/udp +map foo0 from any port le 1 to any port ge 0 -> 0/32 tcp/udp +map foo0 from any port 1 >< 20 to any port 20 <> 40 -> 0/32 tcp/udp diff --git a/contrib/ipfilter/test/regress/n13 b/contrib/ipfilter/test/regress/n13 new file mode 100644 index 0000000..8047930 --- /dev/null +++ b/contrib/ipfilter/test/regress/n13 @@ -0,0 +1 @@ +map le0 192.168.0.0/16 -> range 203.1.1.23-203.1.3.45 diff --git a/contrib/ipfilter/test/regress/n14 b/contrib/ipfilter/test/regress/n14 new file mode 100644 index 0000000..6f5d571 --- /dev/null +++ b/contrib/ipfilter/test/regress/n14 @@ -0,0 +1 @@ +rdr gre0 0/0 port 80 -> 10.1.1.254,10.1.1.253 port 80 tcp sticky diff --git a/contrib/ipfilter/test/regress/ni17.nat b/contrib/ipfilter/test/regress/ni17.nat new file mode 100644 index 0000000..3da6338 --- /dev/null +++ b/contrib/ipfilter/test/regress/ni17.nat @@ -0,0 +1,4 @@ +rdr le0 0/0 port 80 -> 10.1.1.252 port 3128 tcp round-robin +rdr le0 0/0 port 80 -> 10.1.2.252 port 3128 tcp round-robin +rdr le0 0/0 port 80 -> 10.1.3.252 port 3128 tcp round-robin sticky +rdr le0 0/0 port 80 -> 10.1.1.253,10.1.2.253 port 3128 tcp round-robin sticky diff --git a/contrib/ipfilter/test/regress/p2.ipf b/contrib/ipfilter/test/regress/p2.ipf index 5b58647..4cfb388 100644 --- a/contrib/ipfilter/test/regress/p2.ipf +++ b/contrib/ipfilter/test/regress/p2.ipf @@ -1 +1,2 @@ pass out from hash=(127.0.0.1,4.4.0.0/16) to any +block in from hash=(127.0.0.1,4.4.0.0/16) to any diff --git a/contrib/ipfilter/test/test.format b/contrib/ipfilter/test/test.format index 090c8a9..f284542 100644 --- a/contrib/ipfilter/test/test.format +++ b/contrib/ipfilter/test/test.format @@ -1,6 +1,6 @@ #test input-format output-format bpf-f1 text text -bpf1 text text +bpf1 text ipf f1 text text f2 text text f3 text text @@ -18,21 +18,29 @@ f14 text text f15 text text f16 text text f17 hex hex -i1 text text -i2 text text -i3 text text -i4 text text -i5 text text -i6 text text -i7 text text -i8 text text -i9 text text -i10 text text -i11 text text -i12 text text -i13 text text -i14 text text -i15 text text +f18 text text +f19 text text fr_statemax=3 +i1 text ipf +i2 text ipf +i3 text ipf +i4 text ipf +i5 text ipf +i6 text ipf +i7 text ipf +i8 text ipf +i9 text ipf +i10 text ipf +i11 text ipf +i12 text ipf +i13 text ipf +i14 text ipf +i15 text ipf +i16 text ipf +i17 text ipftest +i18 text ipf +i19 text ipf +i20 text ipf +i21 text ipf in1 text text in2 text text in3 text text @@ -56,6 +64,8 @@ n9 hex hex fr_update_ipid=0 n10 hex hex fr_update_ipid=0 n11 text text n12 hex hex fr_update_ipid=0 +n13 text text +n14 text text ni1 hex hex fr_update_ipid=1 ni2 hex hex fr_update_ipid=1 ni3 hex hex fr_update_ipid=1 diff --git a/contrib/ipfilter/test/vfycksum.pl b/contrib/ipfilter/test/vfycksum.pl index 9cb47f6..d23c884 100755 --- a/contrib/ipfilter/test/vfycksum.pl +++ b/contrib/ipfilter/test/vfycksum.pl @@ -3,6 +3,14 @@ # validate the IPv4 header checksum. # $bytes[] is an array of 16bit values, with $cnt elements in the array. # +sub dump { + print "\n"; + for ($i = 0; $i < $#bytes; $i++) { + printf "%04x ", $bytes[$i]; + } + print "\n"; +} + sub dosum { local($seed) = $_[0]; local($start) = $_[1]; @@ -99,7 +107,8 @@ sub tcpcheck { } if ($z) { - print " TCP: missing data($x $y $z)"; + print " TCP: missing data($x $y $z) $hl"; +# &dump(); return; } |