Add bridge name column to --list-networks
list_networks_command() now includes each network's bridge name (recomputed via bridge_name(), not stored -- it's already a pure deterministic function of the network name), tab-aligned the same way as the existing name/kind/subnet columns, positioned before the trailing unaligned IPv6 column. Useful for correlating a network entry with its live host-side state (`ip link show <bridge>`, `iptables -t nat -L`) without recomputing the hash by hand. Verified as root via the doas rule against a fresh extern and intern network. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv3s5jckJKzh6JkMoi2Akz
This commit is contained in:
@@ -177,8 +177,11 @@ Source layout (all under `src/`):
|
||||
the entry appended to `config.networks` and persisted; a network that
|
||||
fails to provision isn't saved. `list_networks_command()` reuses the same
|
||||
independently-per-column tab-alignment scheme as `list_processes_command()`
|
||||
(name/kind/subnet each aligned, then the IPv6 subnet — or `"(no ipv6)"` —
|
||||
appended unaligned as the trailing column, nothing follows it).
|
||||
(name/kind/subnet/bridge each aligned — the bridge name recomputed via
|
||||
`bridge_name(network.name)` — `network_bridge.h` — rather than stored, since
|
||||
it's already a pure deterministic function of the name — then the IPv6
|
||||
subnet — or `"(no ipv6)"` — appended unaligned as the trailing column,
|
||||
nothing follows it).
|
||||
`delete_network_command()` currently only removes the config entry, the
|
||||
same as `delete_volume_command()`'s default (non-`-full`) behavior — it
|
||||
does not tear down the network's live bridge/namespace/iptables state (no
|
||||
|
||||
Reference in New Issue
Block a user