From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config
Date: Fri, 15 May 2026 16:56:19 +0200 [thread overview]
Message-ID: <20260515145622.419236-1-s.hanreich@proxmox.com> (raw)
Otherwise, this produces an error when applying a WireGuard
configuration with newly created interfaces, because `wg syncconf`
gets called for a non-existing interface. post-up commands get
executed for existing interfaces anyway, so subsequent calls to
ifreload for existing interfaces run `wg syncconf`, making separately
applying here unnecessary.
Fixes: cdc488adf70495627b9fc1788abcc58ffcc73e60
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
Notes:
Verified this by applying this patch and then changing the peers of an
interface repeatedly and checking the interface configuration via
`wg`.
Alternatively, we could check for the existence of the interface on
applying via something like `-e /sys/class/net/wg0`? Then only invoke
the syncconf command only when it actually exists?
PVE/API2/Network.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 830daf1fa..c5863ca75 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -923,7 +923,7 @@ __PACKAGE__->register_method({
if ($have_sdn) {
PVE::Network::SDN::generate_etc_network_config();
PVE::Network::SDN::generate_dhcp_config();
- PVE::Network::SDN::WireGuard::generate_wireguard_config(1);
+ PVE::Network::SDN::WireGuard::generate_wireguard_config();
}
my $err = sub {
--
2.47.3
next reply other threads:[~2026-05-15 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 14:56 Stefan Hanreich [this message]
2026-05-16 18:59 ` applied: [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260515145622.419236-1-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox