go-debos / fakemachine

fake a machine
Apache License 2.0
34 stars 37 forks source link

Fails to provide network on IPv6-only hosts #207

Open helmutg opened 3 months ago

helmutg commented 3 months ago

Running fakemachine on an IPv6-only host results in "Network is unreachable" when trying to access the network. The network stack usually tries IPv6 first, but machine.go sets LinkLocalAddressing=no and IPv6AcceptRA=no, so it does not have any IPv6 address nor route and the Linux kernel inside KVM reports -ENETUNREACH. It then falls back to IPv4 and sends a packet. KVM's slirp-based user network stack then tries to send this packet, but observes that the host machine does not have any IPv4 addresses nor routes and generates an ICMPv4 packet indicating -ENETUNREACH. Having failed both address families, -ENETUNREACH is reported to the end user. This makes e.g. debos fail.

Debian-Bug: https://bugs.debian.org/1071033