Changeset 2971 for package_branches/invirt-xen-config/hvirt/vif-invirtroute
- Timestamp:
- Jan 31, 2010, 6:35:39 PM (15 years ago)
- Location:
- package_branches/invirt-xen-config/hvirt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-xen-config/hvirt
- Property svn:mergeinfo changed
/trunk/packages/invirt-xen-config merged: 2857,2859-2860
- Property svn:mergeinfo changed
-
package_branches/invirt-xen-config/hvirt/vif-invirtroute
r2055 r2971 1 1 #!/bin/bash 2 3 4 5 6 2 7 3 #============================================================================ … … 23 19 # ip list of IP networks for the vif, space-separated (default given in 24 20 # this script). 25 # V6PREFIX prefix of v6 address to use 26 # Note that the v6 support is kind of broken because there's not really a way to populate the v6 prefix 21 # 27 22 # This script will set up proxy arp for any ip addresses that are being routed 28 23 # type read to determine if the device is ioemu … … 49 44 offline) 50 45 do_without_error ifdown ${vif} 51 if [ -f /var/run/radvd/radvd.pid.${vif} ] ; then52 do_without_error kill `cat /var/run/radvd/radvd.pid.${vif}`53 fi54 46 ipcmd='del' 55 47 cmdprefix='do_without_error' … … 57 49 esac 58 50 59 v6prefix=${v6prefix:-}60 v6prefix=$(xenstore_read_default "$XENBUS_PATH/v6prefix" "$v6prefix")61 51 vif_type=$(xenstore_read_default "$XENBUS_PATH/type" "viffront") 62 52 if [ ${vif_type} != "ioemu" -o x${qemu_online} = xyes ] ; then … … 66 56 for addr in ${ip} ; do 67 57 ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} 68 arpspoof -i $(invirt-getconf xen. network.iface) -t 18.181.0.1 ${addr}&58 arpspoof -i $(invirt-getconf xen.iface) -t 18.181.0.1 ${addr}& 69 59 sleep 5 70 60 kill %arpspoof 71 61 done 72 62 fi 73 74 if [ x${v6prefix} != x ] ; then75 sed -e "s/@interface@/${dev}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif}76 ${cmdprefix} ip -6 addr ${ipcmd} fe80::/64 scope link dev ${dev}77 if [ $1 = online ] ; then78 radvd -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif}79 fi80 ${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${dev}81 fi82 63 fi 83 84 handle_iptable85 64 86 65 log debug "Successful vif-route $command for $vif."
Note: See TracChangeset
for help on using the changeset viewer.