You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2014/09/07 09:43:29 UTC

[jira] [Commented] (DIRMINA-773) org.apache.mina.filter.firewall.Subnet should consider 0.0.0.0/0 as a subnet that contains 'all the ipv4 addresses'

    [ https://issues.apache.org/jira/browse/DIRMINA-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14124817#comment-14124817 ] 

Emmanuel Lecharny commented on DIRMINA-773:
-------------------------------------------

I guess that something like :

{code}
    public boolean inSubnet(InetAddress address) {
        if (address.isAnyLocalAddress()) {
            return true;
        }

        return toSubnet(address) == subnetInt;
    }
{code}

would do the trick

> org.apache.mina.filter.firewall.Subnet should  consider 0.0.0.0/0 as a subnet that contains 'all the ipv4 addresses'
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-773
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-773
>             Project: MINA
>          Issue Type: Improvement
>          Components: Filter
>    Affects Versions: 2.0.0-RC1
>            Reporter: David Latorre
>              Labels: whitelist
>             Fix For: 2.0.8
>
>
>  One of our users when trying to implement a WhilteListFilter found the problem that there is no way to declare a subnet that would comprise any ip address. 
>  
> As discussed in dev-mailing list, a 0.0.0.0/0 subnet should  return always true for Subnet.inSubnet( any_ipv4_address)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)