routes for different OSs should be handled, cleaned up apply conf

This commit is contained in:
0xdcarns
2022-02-05 14:20:50 -05:00
parent ac5eea4e3d
commit a0ae603a42
8 changed files with 70 additions and 52 deletions

View File

@@ -20,3 +20,7 @@ func deleteRoute(iface string, addr *net.IPNet, address string) error {
_, err = ncutils.RunCmd(fmt.Sprintf("ip route del %s dev %s", addr.String(), iface), true)
return err
}
func setCidr(iface, address string, addr *net.IPNet) {
ncutils.RunCmd("ip -4 route add "+addr.String()+" dev "+iface, false)
}