aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
Diffstat (limited to 'run')
-rwxr-xr-xrun12
1 files changed, 1 insertions, 11 deletions
diff --git a/run b/run
index f4434e6..f3ed4c2 100755
--- a/run
+++ b/run
@@ -26,7 +26,7 @@ no_ask="${2}"
qemu_with_flags() {
if [ -z "$network" ]; then network="rtl8139"; fi
if [ "$network" != "false" ] && [ "$mode" = "net" ]; then
- qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device $network,netdev=net0,id=nic0 -object filter-dump,id=nic0,netdev=net0,file=dump.pcap "$@"
+ qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@"
else
qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -smp 4 "$@"
fi
@@ -168,16 +168,6 @@ make_build() {
}
make_test() {
- if [ "$mode" = "net" ]; then
- brctl show br0 &>/dev/null || (
- sudo brctl addbr br0
- sudo brctl addif br0 enp8s0
- sudo ip tuntap add tap0 mode tap
- sudo ip link set br0 up
- sudo ip link set tap0 up
- )
- fi
-
if [ "$mode" = "test" ]; then
qemu_with_flags -serial file:test.log -nographic -drive file=build/disk.img,format=raw,index=1,media=disk
echo