Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-262

SubnetUtils does not handle /31 and /32 CIDRs well

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Later
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      SubnetUtils does not handle /31 and /32 CIDRs well.

      This should be documented and/or fixed.

      192.168.0.1/32 causes an IllegalArgumentException to be thrown (by the way, that should show the upper and lower bounds)

      192.168.0.3/31 gives
      addressCount=0,
      low =192.168.0.3
      high=192.168.0.2
      and 192.168.0.3 is rejected as not in range

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: