Fix merge bug

This commit is contained in:
Theodor S. Midtlien
2026-10-16 18:24:14 +02:00
parent 9f5f118a32
commit 1bca20bed5
3 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -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
}
+1
View File
@@ -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
-4
View File
@@ -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
}