Fixed conflict between route.flush(), and namespace-route.flush()
parent
da0a84256a
commit
27a90021a7
|
@ -8,6 +8,17 @@ import java.util.*
|
|||
*
|
||||
*/
|
||||
object NameSpace {
|
||||
object Route {
|
||||
fun flush(nameSpace: String) {
|
||||
if (Common.OS_LINUX) {
|
||||
run(nameSpace, "/sbin/ip", "route", "flush", "cache")
|
||||
}
|
||||
else {
|
||||
throw RuntimeException("NOT IMPL.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val nameSpaceToIifToIp: MutableMap<String, MutableMap<String, String>> = HashMap()
|
||||
|
||||
fun add(nameSpace: String) {
|
||||
|
|
|
@ -6,12 +6,8 @@ import dorkbox.executor.Executor
|
|||
*
|
||||
*/
|
||||
object Route {
|
||||
fun flush(nameSpace: String) {
|
||||
if (Common.OS_LINUX) {
|
||||
NameSpace.run(nameSpace, "/sbin/ip route flush cache")
|
||||
} else {
|
||||
throw RuntimeException("NOT IMPL.")
|
||||
}
|
||||
fun flush() {
|
||||
Executor.run("/sbin/ip", "route", "flush", "cache")
|
||||
}
|
||||
|
||||
fun add(targetIpAndCidr: String, hostIP: String, hostInterface: String) {
|
||||
|
|
Loading…
Reference in New Issue