Skip to contentSkip to conversation

Make ping work for -net user

PATCH In review [email protected] 2 participants 2 messages Aug 16, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make ping work for -net user

Basically, when the slirp code gets a ping request for an ip outside of the
slirp network, it runs /bin/ping and reports the results back to the guest
accordingly.

Right now it uses vfork() and then exec() to run ping on the host, as for
some reason fork() causes qemu to freeze. I'm still trying to figure out why.

As a consequence I don't close ping's output or error stream so you see output
from it on the terminal window that qemu is running on.

Tested on a linux host and a linux guest.

Signature · 4 lines
  [email protected]

-- 
http://www.fastmail.fm - Does exactly what it says on the tin
#1 lore raw
Quoted 2 lines · On Thursday 16 August 2007, [email protected] wrote:

This is a very simple proof-of-concept patch that fakes ICMP well enough for ping to work.

Speaking of which... does ping work if qemu runs as root?
As to the patch, it looks like it only works if you're testing whether you actually can ping or not. It wouldn't work with, for example, icmptx.