diff --git a/network/vif-route-qubes b/network/vif-route-qubes index c84b324..8d3251a 100755 --- a/network/vif-route-qubes +++ b/network/vif-route-qubes @@ -47,17 +47,14 @@ domid=${domid/.*/} # 32752 is max XID aka domid metric=$[ 32752 - $domid ] -if iptables --help |grep -q -- --wait; then - wait=--wait -fi - 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} metric $metric done - ${cmdprefix} iptables $wait -t raw $iptables_cmd -i ${vif} \! -s ${ip} -j DROP + echo -e "*raw\n$iptables_cmd -i ${vif} ! -s ${ip} -j DROP\nCOMMIT" | \ + ${cmdprefix} iptables-restore --noflush back_ip=`qubesdb-read /qubes-netvm-gateway` ${cmdprefix} ip addr ${ipcmd} ${back_ip}/32 dev ${vif} fi