From d9aa25a3379c21a999bd39e78702f932ead7b840 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Wed, 4 Aug 2010 17:19:59 -0400 Subject: 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 --- scripts/poky-qemu-ifup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup index e7f689d..3b2ed7c 100755 --- a/scripts/poky-qemu-ifup +++ b/scripts/poky-qemu-ifup @@ -30,7 +30,8 @@ if [ "x$IFCONFIG" = "x" ]; then IFCONFIG=/sbin/ifconfig fi -$IFCONFIG $TAP 192.168.7.1 +n=$[ `echo $TAP | sed 's/tap//'` + 1 ] +$IFCONFIG $TAP 192.168.7.$n # setup NAT for tap0 interface to have internet access in QEMU IPTABLES=`which iptables` -- cgit v1.1