int check_against_blacklist(struct ip_addr *ip, str *text, unsigned short port, unsigned short proto) { unsigned int i; for(i = 0 ; i < used_heads ; i++) if( (bl_marker&(1<<i)) && check_against_rule_list(ip, text, port, proto, i)) return 1; return 0; }
int check_against_blacklist(struct ip_addr *ip, str *text, unsigned short port, unsigned short proto) { unsigned int i; unsigned int bl_marker; /* no context -> no blacklists at all -> successful check */ if (get_bl_marker(&bl_marker) != 0) return 0; for (i = 0; i < used_heads; i++) if (bl_marker & (1 << i) && check_against_rule_list(ip, text, port, proto, i)) return 1; return 0; }