mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
yesterday 74fe31b8864568224d9461e712d8e34e8eb8ba97
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternIP.java
@@ -13,6 +13,7 @@
 *
 * Copyright 2008 Sun Microsystems, Inc.
 * Portions Copyright 2014-2016 ForgeRock AS.
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.authorization.dseecompat;
@@ -386,17 +387,17 @@
     */
    public EnumEvalResult evaluate(InetAddress remoteAddr) {
        EnumEvalResult matched=EnumEvalResult.FALSE;
        IPType ipType=IPType.IPv4;
        IPType remoteIpType=IPType.IPv4;
        byte[] addressBytes=remoteAddr.getAddress();
        if(remoteAddr instanceof Inet6Address) {
            ipType=IPType.IPv6;
            remoteIpType=IPType.IPv6;
            Inet6Address addr6 = (Inet6Address) remoteAddr;
            addressBytes= addr6.getAddress();
            if(addr6.isIPv4CompatibleAddress()) {
                ipType=IPType.IPv4;
                remoteIpType=IPType.IPv4;
            }
        }
        if(ipType != this.ipType) {
        if(remoteIpType != ipType) {
            return EnumEvalResult.FALSE;
        }
        if(matchAddress(addressBytes)) {