Browse Source

fixing merge problems

afeiszli 3 years ago
parent
commit
9f0f5e1a09
1 changed files with 0 additions and 38 deletions
  1. 0 38
      netclient/local/routes_other.go

+ 0 - 38
netclient/local/routes_other.go

@@ -1,38 +0,0 @@
-//go:build !linux
-// +build !linux
-
-package local
-
-import (
-	//"github.com/davecgh/go-spew/spew"
-
-	"fmt"
-	"net"
-
-	"github.com/gravitl/netmaker/netclient/ncutils"
-)
-
-//"github.com/davecgh/go-spew/spew"
-
-/*
-
-These functions are not used. These should only be called by Linux (see routes_linux.go). These routes return nothing if called.
-
-*/
-
-func setRoute(iface string, addr *net.IPNet) error {
-	out, err := ncutils.RunCmd(fmt.Sprintf("ip route get %s", addr.IP.String()), false)
-	if err != nil || !strings.Contains(out, iface) {
-		_, 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 {
-	var err error
-	out, _ := ncutils.RunCmd(fmt.Sprintf("ip route get %s", addr.IP.String()), false)
-	if strings.Contains(out, iface) {
-		_, err = ncutils.RunCmd(fmt.Sprintf("ip route del %s dev %s", addr.String(), iface), true)
-	}
-	return err
-}