Improve IPv4 private IP address detection

Bug #1328429 reported by Dimiter Naydenov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Low
Dimiter Naydenov

Bug Description

In instance/address.go (soon to be network/address.go) we have only 3 classes of private network ranges for IPv4:
 classAPrivate = mustParseCIDR("10.0.0.0/8")
 classBPrivate = mustParseCIDR("172.16.0.0/12")
 classCPrivate = mustParseCIDR("192.168.0.0/16")

We need to handle others as private, like 169.254.0.0/16. Improve this code to properly detect private IPv4 addresses per the specification - see http://tools.ietf.org/html/rfc1918

Also, as we move towards better IPv6 support we should do something similar for it.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Dimiter Naydenov (dimitern)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: next-stable → 1.21-alpha1
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.