* [Qemu-devel] [PATCH] -redir revisited
@ 2006-06-05 12:47 René Korthaus
2006-06-14 13:57 ` Fabrice Bellard
2006-06-14 19:53 ` Ed Swierk
0 siblings, 2 replies; 6+ messages in thread
From: René Korthaus @ 2006-06-05 12:47 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
Hello list,
i am recently working on integrating the -redir option into [Kju:]
for Mac OS X and tested Apache access in debian guest from Mac OS X
host which not worked for me. I discovered a discussion on the list
in November 2005 where a patch was submitted against this (http://
lists.gnu.org/archive/html/qemu-devel/2005-11/msg00419.html).
I researched current qemu cvs and found out that the patch was
integrated not complete but to 95%. There are two lines in slirp/
misc.c that need a change (patch attached). Tested to work with Mac
OS X host and debian guest i could reach the Apache running inside
the guest via localhost:8080 with the appropriate -redir command.
Greetings, cordney*
[-- Attachment #2: localhost-connect-062006.patch --]
[-- Type: application/octet-stream, Size: 498 bytes --]
--- misc.c.orig 2006-06-05 14:12:10.000000000 +0200
+++ misc.c 2006-06-05 14:17:25.000000000 +0200
@@ -94,8 +94,8 @@
he = gethostbyname(buff);
if (he)
our_addr = *(struct in_addr *)he->h_addr;
- if (our_addr.s_addr == 0)
- our_addr.s_addr = loopback_addr.s_addr;
+ if (our_addr.s_addr == 0 || our_addr.s_addr == loopback_addr.s_addr)
+ our_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS);
}
#if SIZEOF_CHAR_P == 8
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] -redir revisited
2006-06-05 12:47 [Qemu-devel] [PATCH] -redir revisited René Korthaus
@ 2006-06-14 13:57 ` Fabrice Bellard
2006-06-14 16:26 ` René Korthaus
2006-06-14 19:53 ` Ed Swierk
1 sibling, 1 reply; 6+ messages in thread
From: Fabrice Bellard @ 2006-06-14 13:57 UTC (permalink / raw)
To: qemu-devel
Hi,
The current behaviour of QEMU seems correct to me: TCP connections
coming localhost are seen coming from 10.0.2.2 on the guest. Your
problem may be related to an incorrect Apache configuration. Did I miss
something ?
Regards,
Fabrice.
René Korthaus wrote:
> Hello list,
>
> i am recently working on integrating the -redir option into [Kju:] for
> Mac OS X and tested Apache access in debian guest from Mac OS X host
> which not worked for me. I discovered a discussion on the list in
> November 2005 where a patch was submitted against this (http://
> lists.gnu.org/archive/html/qemu-devel/2005-11/msg00419.html).
>
> I researched current qemu cvs and found out that the patch was
> integrated not complete but to 95%. There are two lines in slirp/ misc.c
> that need a change (patch attached). Tested to work with Mac OS X host
> and debian guest i could reach the Apache running inside the guest via
> localhost:8080 with the appropriate -redir command.
>
> Greetings, cordney*
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] -redir revisited
2006-06-14 13:57 ` Fabrice Bellard
@ 2006-06-14 16:26 ` René Korthaus
2006-06-14 17:08 ` Fabrice Bellard
0 siblings, 1 reply; 6+ messages in thread
From: René Korthaus @ 2006-06-14 16:26 UTC (permalink / raw)
To: Fabrice Bellard; +Cc: qemu-devel
Am 14.06.2006 um 15:57 schrieb Fabrice Bellard:
> Hi,
>
> The current behaviour of QEMU seems correct to me: TCP connections
> coming localhost are seen coming from 10.0.2.2 on the guest. Your
> problem may be related to an incorrect Apache configuration. Did I
> miss something ?
No, Apache is configured correctly. The same with sshd, i can only
connect to the guest by applying the patch. Network configuration is
given by Qemu DHCP. Without the patch the host simply gets no answer
from the guest service.
Maybe this is Mac OS X specific?
Regards, cordney*
>
> Regards,
>
> Fabrice.
>
> René Korthaus wrote:
>> Hello list,
>> i am recently working on integrating the -redir option into
>> [Kju:] for Mac OS X and tested Apache access in debian guest from
>> Mac OS X host which not worked for me. I discovered a discussion
>> on the list in November 2005 where a patch was submitted against
>> this (http:// lists.gnu.org/archive/html/qemu-devel/2005-11/
>> msg00419.html).
>> I researched current qemu cvs and found out that the patch was
>> integrated not complete but to 95%. There are two lines in slirp/
>> misc.c that need a change (patch attached). Tested to work with
>> Mac OS X host and debian guest i could reach the Apache running
>> inside the guest via localhost:8080 with the appropriate -redir
>> command.
>> Greetings, cordney*
>> ---------------------------------------------------------------------
>> ---
>> _______________________________________________
>> Qemu-devel mailing list
>> Qemu-devel@nongnu.org
>> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] -redir revisited
2006-06-14 16:26 ` René Korthaus
@ 2006-06-14 17:08 ` Fabrice Bellard
0 siblings, 0 replies; 6+ messages in thread
From: Fabrice Bellard @ 2006-06-14 17:08 UTC (permalink / raw)
To: René Korthaus; +Cc: qemu-devel
René Korthaus wrote:
>
> Am 14.06.2006 um 15:57 schrieb Fabrice Bellard:
>
>> Hi,
>>
>> The current behaviour of QEMU seems correct to me: TCP connections
>> coming localhost are seen coming from 10.0.2.2 on the guest. Your
>> problem may be related to an incorrect Apache configuration. Did I
>> miss something ?
>
>
> No, Apache is configured correctly. The same with sshd, i can only
> connect to the guest by applying the patch. Network configuration is
> given by Qemu DHCP. Without the patch the host simply gets no answer
> from the guest service.
>
> Maybe this is Mac OS X specific?
You should launch a tcpdump inside the guest OS and look at the IP
addresses associated to the IP packets when you do a telnet from the
host on the redirected host port.
In any case, the patch you indicate is incorrect (our_addr is an IP
address on the host network, not on the guest network), so a better
solution must be found.
Fabrice.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] -redir revisited
2006-06-05 12:47 [Qemu-devel] [PATCH] -redir revisited René Korthaus
2006-06-14 13:57 ` Fabrice Bellard
@ 2006-06-14 19:53 ` Ed Swierk
2006-06-15 9:32 ` René Korthaus
1 sibling, 1 reply; 6+ messages in thread
From: Ed Swierk @ 2006-06-14 19:53 UTC (permalink / raw)
To: qemu-devel
On 6/5/06, René Korthaus <qemu-dev@cordney.com> wrote:
> I researched current qemu cvs and found out that the patch was
> integrated not complete but to 95%. There are two lines in slirp/
> misc.c that need a change (patch attached). Tested to work with Mac
> OS X host and debian guest i could reach the Apache running inside
> the guest via localhost:8080 with the appropriate -redir command.
It looks like kju: is based on qemu 0.8.0, which definitely had the
bug you found. However, this was fixed in 0.8.1. Did you try a current
version of qemu (0.8.1 or cvs) without your patch?
I'm having trouble seeing how your patch could help solve the redir
problem, since as far as I can tell, our_addr is no longer used for
anything at all. Grepping for our_addr comes up with a buch of hits
that are either #if 0'ed or irrelevant (e.g. get_dns_addr, which
references our_addr before our_addr has been set).
--Ed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] -redir revisited
2006-06-14 19:53 ` Ed Swierk
@ 2006-06-15 9:32 ` René Korthaus
0 siblings, 0 replies; 6+ messages in thread
From: René Korthaus @ 2006-06-15 9:32 UTC (permalink / raw)
To: qemu-devel
Am 14.06.2006 um 21:53 schrieb Ed Swierk:
> On 6/5/06, René Korthaus <qemu-dev@cordney.com> wrote:
>> I researched current qemu cvs and found out that the patch was
>> integrated not complete but to 95%. There are two lines in slirp/
>> misc.c that need a change (patch attached). Tested to work with Mac
>> OS X host and debian guest i could reach the Apache running inside
>> the guest via localhost:8080 with the appropriate -redir command.
>
> It looks like kju: is based on qemu 0.8.0, which definitely had the
> bug you found. However, this was fixed in 0.8.1. Did you try a current
> version of qemu (0.8.1 or cvs) without your patch?
Yes, indeed, cvs worked. I didn't get that patch on the list...
Thanks for your help! Patch is withdrawn...
>
> I'm having trouble seeing how your patch could help solve the redir
> problem, since as far as I can tell, our_addr is no longer used for
> anything at all. Grepping for our_addr comes up with a buch of hits
> that are either #if 0'ed or irrelevant (e.g. get_dns_addr, which
> references our_addr before our_addr has been set).
This was just copy&paste from the patch of November 2005 I mentioned
before.
>
> --Ed
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-15 9:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-05 12:47 [Qemu-devel] [PATCH] -redir revisited René Korthaus
2006-06-14 13:57 ` Fabrice Bellard
2006-06-14 16:26 ` René Korthaus
2006-06-14 17:08 ` Fabrice Bellard
2006-06-14 19:53 ` Ed Swierk
2006-06-15 9:32 ` René Korthaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).