fix: WireGuard peers keep their tunnel key when others come and go (#32) (0.4.1)
CI / test (3.10) (push) Failing after 5s
CI / test (3.11) (push) Successful in 33s
CI / test (3.12) (push) Successful in 36s

get_vpn_tunnels() keyed WireGuard peers with a running counter over the
peer rows, so a peer added ahead of an existing one renumbered every peer
after it. Whatever a consumer stores per key moved with it: netOrk's site
link and tunnel check ended up on a new, offline peer and alarmed while the
real tunnel was up.

The key is now the interface and the start of the public key, as in
napalm-linux, made URL-safe because the key is a path segment. Two peers
sharing the prefix get the whole key; a row without a public key keeps its
position. IPsec and OpenVPN keys were already stable.

Every WireGuard key changes once with this release; netOrk carries its
per-tunnel metadata across (netork#1654).
This commit is contained in:
Christian Manivong committed 2026-10-27 09:10:42 +01:00
1 parent 692a584fd2
commit 661b4fd7c7
3 files changed
+132 -4

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "napalm-opnsense"
version = "0.4.0"
version = "0.4.1"
description = "NAPALM driver for OPNsense (read-only via REST API)."
readme = "README.md"
license = { text = "Apache-2.0" }