From 1bca20bed50f8e72ac941378a4e638426116484d Mon Sep 17 00:00:00 2001 From: "Theodor S. Midtlien" Date: Fri, 16 Oct 2026 18:24:14 +0200 Subject: [PATCH] Fix merge bug --- client/cmd/update_supported.go | 4 ++-- client/iface/configurer/common.go | 1 + client/iface/configurer/usp.go | 4 ---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/cmd/update_supported.go b/client/cmd/update_supported.go index 7ced069e7..0b197f4c5 100644 --- a/client/cmd/update_supported.go +++ b/client/cmd/update_supported.go @@ -4,7 +4,6 @@ package cmd import ( "context" - "fmt" "os" "path/filepath" "strings" @@ -57,7 +56,8 @@ func updateFunc(cmd *cobra.Command, args []string) error { log.Infof("updater started: %s", serviceDirFlag) updater := installer.NewWithDir(tempDirFlag) if err := updater.Setup(context.Background(), dryRunFlag, installerFile, serviceDirFlag); err != nil { - return fmt.Errorf("update application: %w", err) + log.Errorf("failed to update application: %v", err) + return err } return nil } diff --git a/client/iface/configurer/common.go b/client/iface/configurer/common.go index 50adf00d1..02d2a7e6a 100644 --- a/client/iface/configurer/common.go +++ b/client/iface/configurer/common.go @@ -4,6 +4,7 @@ import ( "net" "net/netip" ) + // prefixesToIPNets converts prefixes on their way to a device. It is the only place that // conversion happens, so it also normalizes: the device is then given the same form the // store records, and a v4-mapped prefix cannot reach net.IPNet, which prints such an diff --git a/client/iface/configurer/usp.go b/client/iface/configurer/usp.go index f06c69a1e..1b0965f0d 100644 --- a/client/iface/configurer/usp.go +++ b/client/iface/configurer/usp.go @@ -26,7 +26,6 @@ type WGUSPConfigurer struct { deviceName string activityRecorder *bind.ActivityRecorder statsCache *statsCache - allowedIPs *allowedIPStore uapiListener net.Listener } @@ -44,7 +43,6 @@ func NewUSPConfigurerNoUAPI(device *device.Device, deviceName string, activityRe device: device, deviceName: deviceName, activityRecorder: activityRecorder, - allowedIPs: newAllowedIPStore(), } wgCfg.statsCache = newStatsCache(statsCacheTTL, wgCfg.fetchStats) return wgCfg @@ -129,8 +127,6 @@ func (c *WGUSPConfigurer) UpdatePeer(peerKey string, allowedIps []netip.Prefix, if endpoint != nil { c.activityRecorder.UpsertAddress(peerKey, addrPort) } - - c.allowedIPs.add(peerKeyParsed, allowedIps) return nil }