From: Mitchell E Berger Date: Fri, 25 May 2018 07:14:42 +0000 (-0400) Subject: Don't pass a src argument to 'ip route del' in case the host's "main IP" X-Git-Tag: 0.0.8~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dhcp.git/commitdiff_plain/5f3053213000c7b61b44c662ae91cac287dc4412 Don't pass a src argument to 'ip route del' in case the host's "main IP" has changed and caused the route to be added with a different src than we expect. --- diff --git a/invirt-dhcpserver b/invirt-dhcpserver index e049f15..1541e27 100755 --- a/invirt-dhcpserver +++ b/invirt-dhcpserver @@ -201,7 +201,7 @@ class DhcpBackend: s.syslog(s.LOG_ERR, "Could not check and/or add DNAT for IP %s to %s: %s" % (n.other_ip, n.ip, e)) if other_action == 'remove': try: - p = Popen(['ip', 'route', 'del', n.other_ip, 'dev', intf, 'src', main_ip], stdout=PIPE, stderr=PIPE) + p = Popen(['ip', 'route', 'del', n.other_ip, 'dev', intf], stdout=PIPE, stderr=PIPE) (out, err) = p.communicate() sys.stderr.write(err) sys.stderr.write(out)