Skip to content

Commit

Permalink
Add route for dvpn client using a table name
Browse files Browse the repository at this point in the history
  • Loading branch information
soffokl committed Feb 8, 2023
1 parent 64e46f7 commit 3e03206
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/wireguard/endpoint/dvpnclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"encoding/base64"
"fmt"
"net"
"strings"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 3e03206

Please sign in to comment.