Commit 4e87843
visualizer: suppress interface netmask length when address is unspecified
The InterfaceTableVisualizer default format "%N %\%a%/%l" guards the
slash directive (%/) on the network address being specified, but %l
printed the IPv4 netmask length unconditionally. Any interface with an
unspecified address carries the all-ones default netmask, so its label
rendered as "<unspec>32" -- an orphaned length with no real subnet
behind it.
Guard %l the same way %/ is guarded: return "" when the IPv4 address
is unspecified. Labels now read "<unspec>" instead of "<unspec>32",
and "192.168.0.10/24" once an address is assigned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ffeeb22 commit 4e87843
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments