* [PATCH v2 0/1] runqemu: fix networking issues
@ 2013-05-21 7:38 Laurentiu Palcu
2013-05-21 7:38 ` [PATCH v2 1/1] " Laurentiu Palcu
0 siblings, 1 reply; 2+ messages in thread
From: Laurentiu Palcu @ 2013-05-21 7:38 UTC (permalink / raw)
To: openembedded-core
Additional changes in v2:
* Use 'ip route' instead of 'route';
Thanks,
Laurentiu
The following changes since commit 6271ac326d08fb3e9b4c2008b796233ee11a83e4:
zlib: put shared libraries in base_libdir (2013-05-21 00:18:46 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lpalcu/runqemu_fix
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/runqemu_fix
Laurentiu Palcu (1):
runqemu: fix networking issues
scripts/runqemu-ifup | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] runqemu: fix networking issues
2013-05-21 7:38 [PATCH v2 0/1] runqemu: fix networking issues Laurentiu Palcu
@ 2013-05-21 7:38 ` Laurentiu Palcu
0 siblings, 0 replies; 2+ messages in thread
From: Laurentiu Palcu @ 2013-05-21 7:38 UTC (permalink / raw)
To: openembedded-core
After switching from ifconfig to ip, networking stopped working. This
commit contains the following fixes:
* set a decent broadcast address for the tap device;
* bring up the device;
* add the route using ip tool instead of the old route tool;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
scripts/runqemu-ifup | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index 8948153..5f6a437 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -80,16 +80,6 @@ if [ ! -x "$IFCONFIG" ]; then
exit 1
fi
-ROUTE=`which route`
-if [ "x$ROUTE" = "x" ]; then
- # better than nothing...
- ROUTE=/sbin/route
-fi
-if [ ! -x "$ROUTE" ]; then
- echo "$ROUTE cannot be executed"
- exit 1
-fi
-
IPTABLES=`which iptables 2> /dev/null`
if [ "x$IPTABLES" = "x" ]; then
IPTABLES=/sbin/iptables
@@ -100,10 +90,11 @@ if [ ! -x "$IPTABLES" ]; then
fi
n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
-$IFCONFIG addr add 192.168.7.$n/32 dev $TAP
+$IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP
+$IFCONFIG link set dev $TAP up
dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ]
-$ROUTE add -host 192.168.7.$dest $TAP
+$IFCONFIG route add to 192.168.7.$dest dev $TAP
# setup NAT for tap0 interface to have internet access in QEMU
$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-21 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 7:38 [PATCH v2 0/1] runqemu: fix networking issues Laurentiu Palcu
2013-05-21 7:38 ` [PATCH v2 1/1] " Laurentiu Palcu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.