vm: route through specific host, not directly interface (#355)

This it to not fill ARP cache with any host that VM connects to.
This commit is contained in:
Marek Marczykowski 2011-09-16 00:06:14 +02:00
parent 5f702e9a8a
commit 341a5d76ca

View File

@ -7,7 +7,8 @@ if [ x$ip != x ]; then
secondary_dns=`/usr/bin/xenstore-read qubes_secondary_dns` secondary_dns=`/usr/bin/xenstore-read qubes_secondary_dns`
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255 /sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
/sbin/ifconfig $INTERFACE up /sbin/ifconfig $INTERFACE up
/sbin/route add default dev $INTERFACE /sbin/route add -host $gateway dev $INTERFACE
/sbin/route add default gw $gateway
/sbin/ethtool -K $INTERFACE sg off /sbin/ethtool -K $INTERFACE sg off
echo "nameserver $gateway" > /etc/resolv.conf echo "nameserver $gateway" > /etc/resolv.conf
echo "nameserver $secondary_dns" >> /etc/resolv.conf echo "nameserver $secondary_dns" >> /etc/resolv.conf