Merge branch 'hvm' of 10.141.1.101:/var/lib/qubes/git/marmarek/core into hvm
This commit is contained in:
commit
f7b923db6a
@ -29,14 +29,14 @@ case "$command" in
|
||||
online)
|
||||
ifconfig ${vif} up
|
||||
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
|
||||
ipcmd='add'
|
||||
iptables_cmd='-I FORWARD 1'
|
||||
ipcmd='replace'
|
||||
iptables_cmd='-I PREROUTING 1'
|
||||
cmdprefix=''
|
||||
;;
|
||||
offline)
|
||||
do_without_error ifdown ${vif}
|
||||
ipcmd='del'
|
||||
iptables_cmd='-D FORWARD'
|
||||
iptables_cmd='-D PREROUTING'
|
||||
cmdprefix='do_without_error'
|
||||
;;
|
||||
esac
|
||||
@ -45,10 +45,9 @@ 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
|
||||
echo ${cmdprefix} iptables -t raw $iptables_cmd -i ${vif} \! -s ${ip} -j DROP
|
||||
${cmdprefix} iptables $iptables_cmd -i ${vif} \! -s ${ip} -j DROP
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user