Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Dec 1995 16:06:36 +1000
From:      Stephen Hocking <sysseh@devetir.qld.gov.au>
To:        hackers@freebsd.org
Subject:   Re: Order of rules in ip_fw chain
Message-ID:  <199512160606.GAA17913@netfl15a.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help

A local user (Dave Conran) pointed this problem out to me, and has supplied 
the changes below. He too was irritated because the re-ordering did not 
preserve the semantics of the rules that he wanted.

begin 644 ip_fw.c.gz
M'XL("#QPQC`"`VEP7V9W+F,`[3S]=]O(C3]+?\4DVR22(\MVDK97:^T^KV5O
M?'5L/W]L;N^:QU+D2&+-K_+#BKOU_>T%,!^<(2E93M+KW;WNVTCB#`;`8``,
M@!EZ:Z/+-MAADMYGP6Q>L)[79SN_^]U;-G;C@(?LAZ0,>=$*\X[=S'C,_GUX
M-3R(BSP(^5W@S0$4H2^Y'^1%%DS*(DABYL8^*W/.@ICE29EYG$V3+,H';!$4
M<^K%'TE9L"CQ@VG@N3AL@)C<C+.49U%0%-QG:9;<!3[\*.9N`1]!SGA<!`#C
M)5$$/YF;IMS-<B!5N%XQ;.<'^)@$L9O=$Q\L<N]9XGEEIMEPXWN6<1SAX8`<
M\;#SR5V0E'EX/V!!P18@&I]-.(L#F$\P9?=)R6;N';"2`34`F/-,/P"C?LD1
M"[``J/]2!ED0SRQ$19*P).89T%!\7^,,\V1:+%`.\%L+X$]_.KAB)U>O7ED\
M`UCF@D!XSI(IM=P&L2^Q=7YUXN^R('6FBZ$WN&,[PYUWPW?#'5S-7V]M_W;K
MS5NV_>O==V]WW_V6^2[0F;&CSRG[%8S=ZG:WB*.3*`TY2?KD@J6N=\L+-H4%
M6+AA*."^"V(O+'W.OL_O\ZW4S=QH.-^O-<._HJ4Y`BR)U](^*:?-5C^)W"!N
MMH.0BB1?M%!-D-]F.\^R.&DV%T'$FZVW/(MYB.U&1\R+K:#&(K;!8A:\"1L0
M?-R`E^U.BWAT;]K>7GA+.DH_78;)";QH>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A:-5;BP;/9:Q>5:#7=28!I,UX_:9'+]#NO?C<QVDH8S.-
M:PG3;2S5#[)MH_H>$N#E#.+M2Y&E(UN8J<=4;L7K[6VL84WD"U@;-UGS'V,-
M;X'66:,3_66L^2M96^%I('.L&?X*-<0_?131B_M4!.F]\%^_\/M+9#58ASW(
MQMCV:OGA`4R_>=]\^7:)?[:)@P#1^Y5Q7J;(+:BA>$T,B`3QK+Z)&AS)Q$[V
M"`-^J%_6QM!#7]4N0K`Z=\;!)OLRC\+'4:M_P*E2MYP2HG..3V^NWLMW;:PS
M[9>:"/V)#)/E;6.!&PC_\^CR7."S3_F_$-W!>$P;(_F9>N?XZ'1YY^'II;RJ
MT^X8JZ6G-+_I9/O6_<:&IS;>L"':UNLUFOE=<VQUIFY+5P:._5$=`4S00E`E
M\VLB`"%8"*J@=3D"?27YBPH6EE=16@JV4<:W<;*(M8W(O42(;M0J85V2>3#?
M0'\RYI8]UO@[2\V_%=/5)OT5QH7^8I5IJ8>EEA#9\;EZU\=T-W2#EYB`T'YE
M<-["W<7YZ<FA?,M._[$BJF'1VWB.S!8Z=I.Q=>M!^@VG7FU\O]JY+QSU#D(+
M@QWK-<"])AM6Y/2@W]>C<RMZ69&J[GC9"J]20SKD;X*IX>^8+R!;I+]')_Y.
M2)%4=P)%=@.^&LP*_ZK9[!6/NO*,ID5BRUP1=(&=_A-]C>!MA:=1RM;F)@3W
@*[Q,V^!OZ"*T-G]C![$VWJ7NH?75J;\#?X#9VQ%3``!]
`
end

-- 

        I do not speak for the Worker's Compensation Board of Queensland -
                     They don't pay me enough for that!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512160606.GAA17913>