From: Jeff Dike Date: Wed, 4 Aug 2010 21:19:59 +0000 (-0400) Subject: poky-qemu-ifup: allow multiple tap devices X-Git-Tag: 2011-1~4810 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=d9aa25a3379c21a999bd39e78702f932ead7b840;p=openembedded-core.git 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 --- 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 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`