mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
began route consolidation
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package local
|
||||
|
||||
import (
|
||||
@@ -12,13 +9,13 @@ import (
|
||||
"github.com/gravitl/netmaker/netclient/ncutils"
|
||||
)
|
||||
|
||||
func setRoute(iface string, addr *net.IPNet) error {
|
||||
func setRoute(iface string, addr *net.IPNet, address string) error {
|
||||
var err error
|
||||
_, err = ncutils.RunCmd(fmt.Sprintf("ip route add %s dev %s", addr.String(), iface), true)
|
||||
return err
|
||||
}
|
||||
|
||||
func deleteRoute(iface string, addr *net.IPNet) error {
|
||||
func deleteRoute(iface string, addr *net.IPNet, address string) error {
|
||||
var err error
|
||||
_, err = ncutils.RunCmd(fmt.Sprintf("ip route del %s dev %s", addr.String(), iface), true)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user