summaryrefslogtreecommitdiffstats
path: root/scripts/poky-qemu-ifup
diff options
context:
space:
mode:
authorJeff Dike <jdike@x86_64.user-mode-linux.org>2010-08-04 17:19:59 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-20 16:20:09 +0100
commitd9aa25a3379c21a999bd39e78702f932ead7b840 (patch)
tree09cbff6b7d779f056953b5311b0cbf906981f6f8 /scripts/poky-qemu-ifup
parentc791544bb02e852644c55401018bc17ec1b9b40e (diff)
downloadpoky-d9aa25a3379c21a999bd39e78702f932ead7b840.tar.gz
poky-qemu-ifup: allow multiple tap devices
This patch bases the tap IP address on the device number, providing each device with its own IP address. Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Diffstat (limited to 'scripts/poky-qemu-ifup')
-rwxr-xr-xscripts/poky-qemu-ifup3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup
index e7f689d251..3b2ed7c04a 100755
--- a/scripts/poky-qemu-ifup
+++ b/scripts/poky-qemu-ifup
@@ -30,7 +30,8 @@ if [ "x$IFCONFIG" = "x" ]; then
30 IFCONFIG=/sbin/ifconfig 30 IFCONFIG=/sbin/ifconfig
31fi 31fi
32 32
33$IFCONFIG $TAP 192.168.7.1 33n=$[ `echo $TAP | sed 's/tap//'` + 1 ]
34$IFCONFIG $TAP 192.168.7.$n
34 35
35# setup NAT for tap0 interface to have internet access in QEMU 36# setup NAT for tap0 interface to have internet access in QEMU
36IPTABLES=`which iptables` 37IPTABLES=`which iptables`