Changeset 95
- Timestamp:
- Aug 26, 2007, 6:58:22 PM (17 years ago)
- svk:copy_cache_prev:
- 93
- Location:
- trunk/packages/sipb-xen-dom0/sipb-xen-dom0
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-dom0/sipb-xen-dom0/debian/changelog
r89 r95 1 sipb-xen-dom0 (2.2) unstable; urgency=low 2 3 * Add qemu-ifup script that depends on the device model script and 4 invokes vif-sipbroute. As a consequence, we don't really support 5 bridged hvms any more. It's not clear how to get enough information 6 out of qemu to do this. 7 * Call arpspoof with 18.181.0.1's address. This is unfortunate in two 8 ways. First, if we renumber we'll need to update the script. Second, 9 it is possible that someone on 18.181 besides the router may have an 10 address cached. Unfortunately, it doesn't work right if we don't 11 send the spoofed arp directly to the router. 12 13 -- Sam Hartman <hartmans@debian.org> Sun, 26 Aug 2007 18:57:17 -0400 14 1 15 sipb-xen-dom0 (2.1) unstable; urgency=low 2 16 -
trunk/packages/sipb-xen-dom0/sipb-xen-dom0/files/etc/xen/scripts/vif-sipbroute
r87 r95 1 1 #!/bin/bash 2 2 3 3 4 … … 25 26 # Note that the v6 support is kind of broken because there's not really a way to populate the v6 prefix 26 27 # This script will set up proxy arp for any ip addresses that are being routed 28 # type read to determine if the device is ioemu 27 29 28 30 #============================================================================ … … 32 34 33 35 main_ip=$(dom0_ip) 36 dev=${dev:-${vif}} 34 37 35 38 case "$command" in 36 39 online) 37 ifconfig ${ vif} ${main_ip} netmask 255.255.255.255 up38 echo 1 >/proc/sys/net/ipv4/conf/${ vif}/proxy_arp39 echo 1 >/proc/sys/net/ipv4/conf/${ vif}/rp_filter40 ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up 41 echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp 42 echo 1 >/proc/sys/net/ipv4/conf/${dev}/rp_filter 40 43 ipcmd='add' 41 44 cmdprefix='' … … 53 56 v6prefix=${v6prefix:-} 54 57 v6prefix=$(xenstore_read_default "$XENBUS_PATH/v6prefix" "$v6prefix") 55 56 if [ "${ip}" ] ; then 58 vif_type=$(xenstore_read_default "$XENBUS_PATH/type" "viffront") 59 if [ ${vif_type} != "ioemu" -o x${qemu_online} = xyes ] ; then 60 if [ "${ip}" ] ; then 57 61 # If we've been given a list of IP addresses, then add routes from dom0 to 58 62 # the guest using those addresses. 59 for addr in ${ip} ; do 60 ${cmdprefix} ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip} 61 arpspoof -i eth0 ${addr}& 62 sleep 5 63 kill %arpspoof 64 done 63 for addr in ${ip} ; do 64 ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip} 65 arpspoof -i eth0 -t 18.181.0.1 ${addr}& 66 sleep 5 67 kill %arpspoof 68 done 69 fi 70 71 if [ x${v6prefix} != x ] ; then 72 sed -e "s/@interface@/${dev}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif} 73 ${cmdprefix} ip -6 addr ${ipcmd} fe80::/64 scope link dev ${dev} 74 if [ $1 = online ] ; then 75 radvd -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif} 76 fi 77 ${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${dev} 78 fi 65 79 fi 66 67 if [ x${v6prefix} != x ] ; then68 sed -e "s/@interface@/${vif}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif}69 ${cmdprefix} ip -6 addr ${ipcmd} fe80::/64 scope link dev ${vif}70 if [ $1 = online ] ; then71 radvd -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif}72 fi73 ${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${vif}74 fi75 80 76 81 handle_iptable
Note: See TracChangeset
for help on using the changeset viewer.