+ int rv;
+ tChain *chain;
+ tRule *rule;
+
+ for( chain = gapFirewall_Chains[AddressType]; chain; chain = chain->Next )
+ {
+ if( strcmp(chain->Name, RuleName) == 0 )
+ break;
+ }
+ if( !chain ) return -1; // Bad rule name
+
+ // Check the rules
+ for( rule = chain->FirstRule; rule; rule = rule->Next )
+ {
+ rv = IPTables_DoRule(rule, AddressType, Src, Dest, Type, Flags, Length, Data);
+ if( rv == -1 )
+ continue ;
+
+ return rv;
+ }
+
+