* [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config
@ 2026-05-15 14:56 Stefan Hanreich
2026-05-16 18:59 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2026-05-15 14:56 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* applied: [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config
2026-05-15 14:56 [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config Stefan Hanreich
@ 2026-05-16 18:59 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-05-16 18:59 UTC (permalink / raw)
To: pve-devel, Stefan Hanreich
On Fri, 15 May 2026 16:56:19 +0200, Stefan Hanreich wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] network: drop apply flag when generating wireguard config
commit: 51056af5b42e46836909e4950e1a694f9441026f
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-16 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 14:56 [PATCH pve-manager 1/1] network: drop apply flag when generating wireguard config Stefan Hanreich
2026-05-16 18:59 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.