aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>2003-07-14 16:42:44 +0000
committerrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>2003-07-14 16:42:44 +0000
commit42332dd3c3e0b81542372f0b409e795738016396 (patch)
treecbfa843876c2c4e4f326de31e883e8f21233e62d /tools
parentc20e88617b13f157612f0f6555ba77f849bbeecb (diff)
downloadxen-42332dd3c3e0b81542372f0b409e795738016396.tar.gz
xen-42332dd3c3e0b81542372f0b409e795738016396.tar.bz2
xen-42332dd3c3e0b81542372f0b409e795738016396.zip
bitkeeper revision 1.339.1.9 (3f12dd84Gykr1oP22loPEr0jPp3VJA)
Detect link-local addresses in xi_vifinit and route them via dom0, not the physical interface
Diffstat (limited to 'tools')
-rwxr-xr-xtools/internal/xi_vifinit10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/internal/xi_vifinit b/tools/internal/xi_vifinit
index 0da845984b..45b44704c3 100755
--- a/tools/internal/xi_vifinit
+++ b/tools/internal/xi_vifinit
@@ -16,7 +16,15 @@ then
fi
#outbound rule:
-echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
+echo $3 | grep -q "^169\\.254\\."
+if [ $? -eq 0 ];
+then
+ # If this is a link local address, send to dom0
+ echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dstdom=0 dstidx=0 proto=any" > /proc/xeno/vfr
+else
+ # If this is not, send to wire
+ echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
+fi
#inbound rule:
echo "ADD ACCEPT dstaddr=$3 dstaddrmask=255.255.255.255 src=ANY dstdom=$1 dstidx=$2 proto=any" > /proc/xeno/vfr