diff options
author | Marvin Borner | 2020-11-01 21:26:10 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-01 21:26:10 +0100 |
commit | 7bd11f0275cf22089177692092d73ab73ede87fa (patch) | |
tree | 98eea905a7f6fe02dc90bb45145bcc1f1dce4863 /run | |
parent | f40be8b5b6227775901a99946779661d0b4439e6 (diff) |
New (working!) network approach
Diffstat (limited to 'run')
-rwxr-xr-x | run | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -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 |