* Don't crash if IP address not supplied

This commit is contained in:
Scott Kitterman 2007-02-08 05:34:14 +00:00
commit 2e961db6b5

View file

@ -156,9 +156,11 @@ while (<STDIN>) {
sub exempt_localhost {
my %options = @_;
my $attr = $options{attr};
my $client_address = NetAddr::IP->new($attr->{client_address});
return 'PREPEND X-Comment SPF not applicable to localhost connection, skipped check'
if grep($_->contains($client_address), localhost_addresses);
if ($attr->{client_address} != '') {
my $client_address = NetAddr::IP->new($attr->{client_address});
return 'PREPEND X-Comment SPF not applicable to localhost connection, skipped check'
if grep($_->contains($client_address), localhost_addresses);
};
return 'DUNNO';
}