File bnc#852611.diff of Package amavisd-new.2331
--- amavisd-new-2.8.1/amavisd.orig 2013-11-28 09:03:42.091038449 +0100
+++ amavisd-new-2.8.1/amavisd 2013-11-28 09:07:03.840318157 +0100
@@ -5604,7 +5604,7 @@
my(@d) = ($2,$3,$4,$5);
!grep($_ > 255, @d)
or die "Invalid decimal field value in IPv6 address: [$ip]\n";
- $ipa = $2 . sprintf('%02x%02x:%02x%02x', @d);
+ $ipa = $1 . sprintf('%02x%02x:%02x%02x', @d);
} elsif (!$have_ipv6 &&
$ipa =~ m{^ \d{1,3} (?: \. \d{1,3}){0,3} \z}xs) { # IPv4
my(@d) = split(/\./,$ipa,-1);
@@ -5642,7 +5642,7 @@
}
@ip_fields >= 8 or die "IPv6 address [$ip] contains fewer than 8 fields\n";
@ip_fields <= 8 or die "IPv6 address [$ip] contains more than 8 fields\n";
- !grep(!/^[0-9a-zA-Z]{1,4}\z/, @ip_fields) # this is quite slow
+ !grep(!/^[0-9a-fA-F]{1,4}\z/, @ip_fields) # this is quite slow
or die "Invalid syntax of IPv6 address: [$ip]\n";
my $vec = pack('n8', map(hex($_),@ip_fields));
if (!defined($ip_len)) {