2010/3/3 Karsten Bräckelmann <[email protected]>:
>> OK -- I've addressed guenther's issue, and cleaned up that conditional code
>> in
>> a more consistent way with the existing code. Also, the reason the rule was
>> now not hitting was because I used the wrong rule type in the first place for
>> URIBL_DBL! doh. using "urirhssub" now seems to be working with a test msg
>> here.
>
> + # set to 1 if _any_ URIBL supports non-domains_only lookups
> + my $dnsbl_lookup_ips;
>
> Not initialized. ;)
that's deliberate. undef is a better "false" value than 0, IMO. ;)
> Anyway, as I just said in a previous post, do we
> need that? The comment now is correct. However, it guards the
>
> + if ($dnsbl_lookup_ips) {
> + $self->lookup_dnsbl_for_ip($scanner, $obj, $dom);
>
> call exactly then. Called, if *any* URIBL supports IPs. Not called only
> in the corner case, if all URIBLs are unhappy with IPs. Is it worth the
> loop, to prevent that function call? lookup_dnsbl_for_ip() has the
> tflags check now itself.
OK, that's a fair point, it would be more optimal to omit that
loop, but I don't think it's a big deal as it is. ;)
> Also, in sub lookup_dnsbl_for_ip():
>
> + next if ($tflags->{$rulename} =~ /\b(?:ips_only|domains_only)\b/);
>
> No IP lookup, with tflags ips_only?
the "tflags ips_only" case with "urirhsbl/urirhssub"-type rules is handled
by the lookup_single_dnsbl() loop slightly further down, not in that loop
at all. lookup_dnsbl_for_ip() is used for a different style of BL --
the traditional "uridnsbl/uridnssub" type like URIBL_SBL. That was
part of my initial bug.
--j.