diff --git a/internal/vpn/client.go b/internal/vpn/client.go index 7ec9e9afd..11ad7da25 100644 --- a/internal/vpn/client.go +++ b/internal/vpn/client.go @@ -74,8 +74,9 @@ func NewClient(cfg ClientConfig, l logrus.FieldLogger, conn net.Conn) (*Client, } } - directIPs := make([]net.IP, 0, 3+len(dmsgSrvAddrs)+len(stcpEntities)) - directIPs = append(directIPs, dmsgDiscIP, tpDiscIP, rfIP) + requiredDirectIPs := []net.IP{dmsgDiscIP, tpDiscIP, rfIP} + directIPs := make([]net.IP, 0, len(requiredDirectIPs)+len(dmsgSrvAddrs)+len(stcpEntities)) + directIPs = append(directIPs, requiredDirectIPs...) directIPs = append(directIPs, dmsgSrvAddrs...) directIPs = append(directIPs, stcpEntities...)