From 3e03206c15797bc009fc842cf7ef794d1aa6a3bb Mon Sep 17 00:00:00 2001 From: Dmitry Shihovtsev Date: Wed, 8 Feb 2023 10:51:40 +0600 Subject: [PATCH] Add route for dvpn client using a table name --- services/wireguard/endpoint/dvpnclient/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/wireguard/endpoint/dvpnclient/client.go b/services/wireguard/endpoint/dvpnclient/client.go index 2552a42ba5..17f5361c94 100644 --- a/services/wireguard/endpoint/dvpnclient/client.go +++ b/services/wireguard/endpoint/dvpnclient/client.go @@ -21,7 +21,6 @@ import ( "encoding/base64" "fmt" "net" - "strings" "time" "github.com/pkg/errors" @@ -76,7 +75,7 @@ func (c *client) ConfigureDevice(config wgcfg.DeviceConfig) error { } gw[3]-- - if err := cmdutil.SudoExec("ip", "route", "add", "default", "via", gw.String(), "dev", config.IfaceName, "table", strings.TrimLeft(config.IfaceName, "myst")); err != nil { + if err := cmdutil.SudoExec("ip", "route", "add", "default", "via", gw.String(), "dev", config.IfaceName, "table", config.IfaceName); err != nil { return err } }