diff options
author | Jeff Dike <jdike@x86_64.user-mode-linux.org> | 2010-08-04 17:19:59 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 16:20:09 +0100 |
commit | d9aa25a3379c21a999bd39e78702f932ead7b840 (patch) | |
tree | 09cbff6b7d779f056953b5311b0cbf906981f6f8 /scripts/poky-qemu-ifup | |
parent | c791544bb02e852644c55401018bc17ec1b9b40e (diff) | |
download | poky-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-x | scripts/poky-qemu-ifup | 3 |
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 |
31 | fi | 31 | fi |
32 | 32 | ||
33 | $IFCONFIG $TAP 192.168.7.1 | 33 | n=$[ `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 |
36 | IPTABLES=`which iptables` | 37 | IPTABLES=`which iptables` |