Remove / replace default route on ipv4 hosts
This commit is contained in:
parent
d68fd2d431
commit
c5a3be5ccf
2 changed files with 20 additions and 7 deletions
|
|
@ -330,6 +330,7 @@ class L2Controller(object):
|
|||
log.debug("Config v4 host: {} {}->{} on {}".format(host, net, ipaddr, dev))
|
||||
|
||||
subprocess.call(["mx", host, "ip", "addr", "flush", "dev", dev])
|
||||
subprocess.call(["mx", host, "ip", "route", "del", "default"])
|
||||
subprocess.call(["mx", host, "ip", "addr", "add", ipaddr, "dev", dev])
|
||||
|
||||
if router:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue