commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Makoto Sakaguchi (JIRA)" <>
Subject [jira] [Created] (NET-624) SubnetInfo#toCidrNotation - allow a subnet mask
Date Thu, 09 Mar 2017 21:33:37 GMT
Makoto Sakaguchi created NET-624:

             Summary: SubnetInfo#toCidrNotation - allow a subnet mask
                 Key: NET-624
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Makoto Sakaguchi

An IPv4 subnet mask, which is also the network mask, must consist of a set of contiguous 1-bits
followed by a block of 0-bits (i.e., but it does not check.

/* is 11111111.11111111.00000000.00000001 in  binary */
SubnetUtils su = new Subnet("", ""); // expect error
SubnetInfo si = su.getInfo();
System.out.println(si.getNetmask()); // Expect error or

This message was sent by Atlassian JIRA

View raw message