From 5f3053213000c7b61b44c662ae91cac287dc4412 Mon Sep 17 00:00:00 2001 From: Mitchell E Berger Date: Fri, 25 May 2018 03:14:42 -0400 Subject: [PATCH] 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. --- invirt-dhcpserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 1.7.9.5