X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfatables%2Fruntime.py;h=dc9e7cbf3aaa036d3dd5b7014c219b3667d2db01;hp=0dab15d3869423ef16103f09d28879a459451db3;hb=342b9b05015e6a009d9dbccf559ae66334298b1f;hpb=399522259747781cf9e9b6f28770ceeb98396ed3 diff --git a/sfatables/runtime.py b/sfatables/runtime.py index 0dab15d3..dc9e7cbf 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -26,6 +26,8 @@ class SFATablesRules: intermediate_rspec = rspec for rule in self.sorted_rule_list: intermediate_rspec = rule.apply_interpreted(intermediate_rspec) + if (rule.terminal): + break return intermediate_rspec @@ -33,37 +35,8 @@ def main(): incoming = SFATablesRules('INCOMING') outgoing = SFATablesRules('OUTGOING') - rspec = """ - - - plc.princeton.sapan - + rspec = open(sys.argv[1]).read() - - - hrn - plc - - - whitelist - plc.princeton - - - blacklist - plc.tp - - - - - - - - - - - - - """ print "%d rules loaded for INCOMING chain\n"%len(incoming.sorted_rule_list)