diff --git a/network/vif-route-qubes b/network/vif-route-qubes index 57cd33e..c84b324 100755 --- a/network/vif-route-qubes +++ b/network/vif-route-qubes @@ -47,13 +47,17 @@ 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 -w -t raw $iptables_cmd -i ${vif} \! -s ${ip} -j DROP + ${cmdprefix} iptables $wait -t raw $iptables_cmd -i ${vif} \! -s ${ip} -j DROP back_ip=`qubesdb-read /qubes-netvm-gateway` ${cmdprefix} ip addr ${ipcmd} ${back_ip}/32 dev ${vif} fi