`network-get` can return incorrect CIDRs
Bug #1770127 reported by
Eric Claude Jones
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.
tags: |
added: add-machine network removed: ne |
summary: |
- `netowrk-get` can return incorrect CIDRs + `network-get` can return incorrect CIDRs |
tags: | added: network-get |
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 |
To post a comment you must log in.
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.