X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-xen-config.git/blobdiff_plain/8dc5e4370d7c0896e9abda7d6d36f72b595690d2..7b56ce9f85e82b58644332b793cfbb7e92752992:/vif-invirtroute diff --git a/vif-invirtroute b/vif-invirtroute index e5b96bd..26464a0 100755 --- a/vif-invirtroute +++ b/vif-invirtroute @@ -40,7 +40,9 @@ case "$command" in ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp echo 1 >/proc/sys/net/ipv4/conf/${dev}/rp_filter - ethtool -K ${dev} tx off + if [ x${qemu_online} != xyes ]; then + ethtool -K ${dev} tx off + fi ipcmd='add' cmdprefix='' ;; @@ -63,7 +65,7 @@ if [ ${vif_type} != "ioemu" -o x${qemu_online} = xyes ] ; then # the guest using those addresses. for addr in ${ip} ; do ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} - arpspoof -i eth2 -t 18.181.0.1 ${addr}& + arpspoof -i $(invirt-getconf xen.network.iface) -t 18.181.0.1 ${addr}& sleep 5 kill %arpspoof done @@ -79,8 +81,6 @@ if [ ${vif_type} != "ioemu" -o x${qemu_online} = xyes ] ; then fi fi -handle_iptable - log debug "Successful vif-route $command for $vif." if [ "$command" == "online" ] then