From 41a03667195b6bb3721e7332cb005806f9153d74 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 24 Feb 2012 17:10:16 +0100 Subject: [PATCH] vm/network: do not fail when route already exists - override it --- network/vif-route-qubes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network/vif-route-qubes b/network/vif-route-qubes index 5359063..c4a768f 100755 --- a/network/vif-route-qubes +++ b/network/vif-route-qubes @@ -45,7 +45,8 @@ if [ "${ip}" ] ; then # If we've been given a list of IP addresses, then add routes from dom0 to # the guest using those addresses. for addr in ${ip} ; do - ${cmdprefix} ip route ${ipcmd} ${addr} dev ${vif} + ${cmdprefix} ip route del ${addr} || true + ${cmdprefix} ip route ${ipcmd} ${addr} dev ${vif} || true done echo ${cmdprefix} iptables $iptables_cmd -i ${vif} \! -s ${ip} -j DROP ${cmdprefix} iptables $iptables_cmd -i ${vif} \! -s ${ip} -j DROP