tv42/alone

QEMU hostfwd networking is broken with newer kernels

tv42 opened this issue · 2 comments

tv42 commented

This may be related to our kernel.conf.

It used to work with kernel 002acf1fc16cf60e60345bd68e03734628505b83 aka v3.13-rc2-295-g002acf1

tv42 commented

http://blog.vmsplice.net/2011/04/how-to-capture-vm-network-traffic-using.html

diff --git i/do-run-network w/do-run-network
index 955f713..e673c16 100755
--- i/do-run-network
+++ w/do-run-network
@@ -14,4 +14,5 @@ exec qemu-system-x86_64 \
     -initrd network.alone \
     -append 'console=ttyS0,115200n8 ip=dhcp' \
     -net nic,model=virtio,name=eth0 \
+    -net dump,file=vm.pcap \
     -net user,hostfwd=tcp:127.0.0.1:8000-:80
$ tcpdump -ner vm.pcap
reading from file vm.pcap, link-type EN10MB (Ethernet)
01:54:48.170436 52:55:0a:00:02:02 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 10.0.2.2.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
01:54:48.170464 52:54:00:12:34:56 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:12:34:56, length 548
01:54:48.178740 52:55:0a:00:02:02 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 10.0.2.2.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
01:54:48.178778 52:54:00:12:34:56 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:12:34:56, length 548
01:55:11.551227 52:55:0a:00:02:02 > 52:54:00:12:34:56, ethertype IPv4 (0x0800), length 58: 10.0.2.2.47698 > 10.0.2.15.80: Flags [S], seq 3328001, win 8760, options [mss 1460], length 0
01:55:17.539889 52:55:0a:00:02:02 > 52:54:00:12:34:56, ethertype IPv4 (0x0800), length 58: 10.0.2.2.47698 > 10.0.2.15.80: Flags [S], seq 3328001, win 8760, options [mss 1460], length 0

The SYN just repeats, there is never a SYN-ACK seen from the vm.

tv42 commented

Looks like it's a generic Linux bug, introduced in ef547f2ac16bd9d77a780a0e7c70857e69e8f23f, and v4.3 works just fine.