From c73faac7f95ec837da6f964d15cc05ff9ffd2de6 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 7 Oct 2026 19:56:37 +0200 Subject: interfaces: T3871: name interfaces from a slot-anchored mapping store Names used to be derived from 'hw-id' in config.boot. A node carrying an address but no hw-id had to be matched to some NIC, and nothing available at boot could say which one - every heuristic could bind a configured address to the wrong physical wire. Naming authority moves to a mapping store binding a name to the slot the hardware occupies. The slot is the identity, so a replacement card in that slot is that interface again. The store renders systemd .link files, leaving udev to apply names as devices appear. --- src/systemd/vyos-net-name-resolve.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/systemd/vyos-net-name-resolve.service (limited to 'src/systemd') diff --git a/src/systemd/vyos-net-name-resolve.service b/src/systemd/vyos-net-name-resolve.service new file mode 100644 index 000000000..c3563dd84 --- /dev/null +++ b/src/systemd/vyos-net-name-resolve.service @@ -0,0 +1,15 @@ +[Unit] +Description=VyOS persistent interface naming +Documentation=man:vyos-net-name-resolve.py(8) + +# Started by vyos-router once the config directory is mounted - for an +# encrypted volume that is only after it has been unlocked - so this can not +# be ordered independently. +DefaultDependencies=no + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/vyos/system/vyos-net-name-resolve.py +TimeoutStartSec=90 +StandardOutput=journal+console -- cgit v1.2.3