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

@@ -17,3 +17,7 @@ func deleteRoute(iface string, addr *net.IPNet, address string) error {
_, err = ncutils.RunCmd("route delete -net "+addr.String()+" -interface "+iface, true)
return err
}
func setCidr(iface, address string, addr *net.IPNet) {
ncutils.RunCmd("route add -net "+addr.String()+" -interface "+iface, true)
}