I want to make an all-inclusive ip range in commons-net, but when I try
SubnetUtils subnetUtils = new SubnetUtils("0.0.0.0", "0.0.0.0");
or the same:
SubnetUtils subnetUtils = new SubnetUtils("0.0.0.0/0");
I get an exception:
java.lang.IllegalArgumentException: Value [0] not in range (0,32]
at org.apache.commons.net.util.SubnetUtils.rangeCheck(SubnetUtils.java:304)
at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:229)
at org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:63)
I saw there is already a ticket for this: https://issues.apache.org/jira/browse/NET-511 . They say, that the issue is resolved in the next (3.4) release.
By the time commons-net 3.4 is released, is there any workaround (like a List of SubnetUtils objects) that together allows each IPv4 addresses?