`network-get` can return incorrect CIDRs

Bug #1770127 reported by Eric Claude Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Eric Claude Jones

Bug Description

`network-get` can report invalid CIDRs. The CIDR is reported in an invalid <hostname>/128 notation (RFC 4291 & RFC 4632) where the decimal value is always fixed at 128.

One way this can happen is as follows: When a machine is manually provisioned using a resolvable hostname (e.g. `juju add-machine ssh:jujucharms.com`) the hostname will end up in the `network-get` egress-subnet CIDR output (and other places) and, as mentioned above, the decimal part of the CIDR will be at 128.

tags: added: add-machine network
removed: ne
summary: - `netowrk-get` can return incorrect CIDRs
+ `network-get` can return incorrect CIDRs
Ian Booth (wallyworld)
tags: added: network-get
Revision history for this message
Eric Claude Jones (ecjones) wrote :

One, straight forward, but potentially noisy way to fix this is to use the type system to prevent the propagation of invalid data. Replacing the existing `string` type with a `net.IP` type throughout the program would ensure that all code paths are in an IP format and force the code to explicitly resolve any hostnames on input.

Revision history for this message
Eric Claude Jones (ecjones) wrote :
Changed in juju:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Eric Claude Jones (ecjones)
importance: Low → Medium
Changed in juju:
status: Triaged → Fix Committed
Revision history for this message
Joseph Phillips (manadart) wrote :

This was fixed as of version 2.4.

Changed in juju:
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.