From 6610b22f97a20d1a08b5731b6e78dabc17f9be75 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 3 Mar 2012 01:26:06 +0100 Subject: [PATCH] vm/network: replace route in more elegant way --- network/vif-route-qubes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/network/vif-route-qubes b/network/vif-route-qubes index c4a768f..d6183e2 100755 --- a/network/vif-route-qubes +++ b/network/vif-route-qubes @@ -29,7 +29,7 @@ case "$command" in online) ifconfig ${vif} up echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp - ipcmd='add' + ipcmd='replace' iptables_cmd='-I FORWARD 1' cmdprefix='' ;; @@ -45,7 +45,6 @@ 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 del ${addr} || true ${cmdprefix} ip route ${ipcmd} ${addr} dev ${vif} || true done echo ${cmdprefix} iptables $iptables_cmd -i ${vif} \! -s ${ip} -j DROP