]> git.proxmox.com Git - pmg-api.git/blobdiff - src/PMG/RuleCache.pm
fix #1653: parse ipv6 xforward correctly
[pmg-api.git] / src / PMG / RuleCache.pm
index 0b97839bd2220c5ccd78bc94a14c6fcd5595cbc8..9b18e7ee80fba14af5efd6aa6cc966bfbaf9607d 100644 (file)
@@ -239,6 +239,11 @@ sub from_match {
 
     return 1 if !defined ($from);
 
+    # postfix prefixes ipv6 addresses with IPv6:
+    if ($ip =~ /^IPv6:(.*)/) {
+       $ip = $1;
+    }
+
     foreach my $obj (@$from) {
        return 1 if $obj->who_match($addr, $ip, $ldap);
     }