[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Separate alias_addr (10.0.2.2) from our_addr in sli
From: |
Ed Swierk |
Subject: |
[Qemu-devel] [PATCH] Separate alias_addr (10.0.2.2) from our_addr in slirp |
Date: |
Mon, 1 May 2006 17:11:10 -0700 |
On 5/1/06, Fabrice Bellard <address@hidden> wrote:
I am not sure this patch is sufficient: sometimes our_addr is used to
open socket on the host side and 10.0.2.2 has a meanning only on the VM
side.
Indeed, our_addr seems to be used for two distinct purposes:
- application protocol emulation code (like udp_emu() in udp.c) uses
the "host" address for opening sockets on the host; I'm not familiar
with the details of these protocols, but in any event it must be some
address that is meaningful to applications running on the host side;
- elsewhere in slirp, the "alias" address (10.0.2.2) is used to
rewrite the source address of packets originating from the host to the
VM; this address makes sense only within the VM.
The attached patch adds a new global, alias_addr, that is set to
10.0.2.2 and replaces our_addr in the latter cases. The patch also
changes getouraddr() so that it always returns either a "real" address
(as determined by gethostbyname(gethostname()) or 127.0.0.1, but never
10.0.2.2.
--Ed
qemu-alias-addr.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Separate alias_addr (10.0.2.2) from our_addr in slirp,
Ed Swierk <=