Skip to contentSkip to conversation

Is there a reason -redir binds to INADDR_ANY?

Qemu-devel David Barrett 1 participant 1 message Jul 15, 2008

lore
Share & tools
lore
#0 lore raw

I'm using qemu on a server with multiple ips/interfaces and I'd like to use -redir to bind a specific host ip:port to a specific guest ip:port.
However, -redir doesn't allow specifying a host ip, and instead just
binds to INADDR_ANY on the host system. (in slirp/socket.c/solisten())

Is there a particular reason for this limitation? Is there any interest in a patch to allow specific host interface binding?

It seems a straightforward change, through the most obvious choice for a new -redir syntax might create backwards compatibility problems. It's currently:

-redir [tcp|udp]:host-port:[guest-host]:guest-port

And the most obvious change would be something like:

	-redir [tcp|udp]:[host-host]:host-port:[guest-host]:guest-port

Granted, the parser could choose the first syntax if only three colons are found, and the second if four are found... but that's not very pretty.

Incidentally, is there a rough timeline or estimate for the next formal release of qemu? I'm not super eager to deviate from the mainline for long, nor adopt unstable code prematurely.

Thanks!

-david