qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
@ 2009-07-02 15:29 Jan Kiszka
  2009-07-10 17:16 ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-07-02 15:29 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Avi Kivity

This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
255.255.255.0.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net.c b/net.c
index 6d82d59..8213134 100644
--- a/net.c
+++ b/net.c
@@ -783,7 +783,7 @@ static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model,
 {
     /* default settings according to historic slirp */
     struct in_addr net  = { .s_addr = htonl(0x0a000000) }; /* 10.0.0.0 */
-    struct in_addr mask = { .s_addr = htonl(0xff000000) }; /* 255.0.0.0 */
+    struct in_addr mask = { .s_addr = htonl(0xffffff00) }; /* 255.255.255.0 */
     struct in_addr host = { .s_addr = htonl(0x0a000202) }; /* 10.0.2.2 */
     struct in_addr dhcp = { .s_addr = htonl(0x0a00020f) }; /* 10.0.2.15 */
     struct in_addr dns  = { .s_addr = htonl(0x0a000203) }; /* 10.0.2.3 */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
  2009-07-02 15:29 [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0 Jan Kiszka
@ 2009-07-10 17:16 ` Anthony Liguori
  2009-07-10 17:20   ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Liguori @ 2009-07-10 17:16 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel, Avi Kivity

Jan Kiszka wrote:
> This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
> 255.255.255.0.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>   

I don't understand why, but this changeset breaks -net user for me.  I get:

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -L 
~/git/qemu/pc-bios
qemu: Could not initialize device 'user'

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
  2009-07-10 17:16 ` Anthony Liguori
@ 2009-07-10 17:20   ` Jan Kiszka
  2009-07-10 17:25     ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-07-10 17:20 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Anthony Liguori, qemu-devel, Avi Kivity

Anthony Liguori wrote:
> Jan Kiszka wrote:
>> This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
>> 255.255.255.0.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>   
> 
> I don't understand why, but this changeset breaks -net user for me.  I get:
> 
> x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -L
> ~/git/qemu/pc-bios
> qemu: Could not initialize device 'user'

Weird, double-checking locally. Is linux.img raw or something else (you
know, that pending -snapshot breakage with raw image...)?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
  2009-07-10 17:20   ` Jan Kiszka
@ 2009-07-10 17:25     ` Anthony Liguori
  2009-07-10 17:37       ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Liguori @ 2009-07-10 17:25 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel, Avi Kivity

Jan Kiszka wrote:
> Anthony Liguori wrote:
>   
>> Jan Kiszka wrote:
>>     
>>> This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
>>> 255.255.255.0.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>   
>>>       
>> I don't understand why, but this changeset breaks -net user for me.  I get:
>>
>> x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -L
>> ~/git/qemu/pc-bios
>> qemu: Could not initialize device 'user'
>>     
>
> Weird, double-checking locally. Is linux.img raw or something else (you
> know, that pending -snapshot breakage with raw image...)?
>   

It's a qcow2 and I don't know what -snapshot breakage you're referring to.

It's reproducible without -snapshot and reproducible directly on top of 
master (minus all the crap in staging).

Regards,

Anthony Liguori

> Jan
>
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
  2009-07-10 17:25     ` Anthony Liguori
@ 2009-07-10 17:37       ` Jan Kiszka
  2009-07-10 17:45         ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-07-10 17:37 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Anthony Liguori, qemu-devel, Avi Kivity

Anthony Liguori wrote:
> Jan Kiszka wrote:
>> Anthony Liguori wrote:
>>  
>>> Jan Kiszka wrote:
>>>    
>>>> This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
>>>> 255.255.255.0.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>         
>>> I don't understand why, but this changeset breaks -net user for me. 
>>> I get:
>>>
>>> x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -L
>>> ~/git/qemu/pc-bios
>>> qemu: Could not initialize device 'user'
>>>     
>>
>> Weird, double-checking locally. Is linux.img raw or something else (you
>> know, that pending -snapshot breakage with raw image...)?
>>   
> 
> It's a qcow2 and I don't know what -snapshot breakage you're referring to.

The one caused by Ram Pai's colon patch - but it was unrelated to this
one.

> 
> It's reproducible without -snapshot and reproducible directly on top of
> master (minus all the crap in staging).

Hmpf, my bad. Use this patch instead:

------>

From: Jan Kiszka <jan.kiszka@siemens.com>
Subject: [PATCH] slirp: Fix default netmask to 255.255.255.0

This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
255.255.255.0.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net.c b/net.c
index 1507f37..a0c4153 100644
--- a/net.c
+++ b/net.c
@@ -782,8 +782,8 @@ static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model,
                           const char *vsmbserver)
 {
     /* default settings according to historic slirp */
-    struct in_addr net  = { .s_addr = htonl(0x0a000000) }; /* 10.0.0.0 */
-    struct in_addr mask = { .s_addr = htonl(0xff000000) }; /* 255.0.0.0 */
+    struct in_addr net  = { .s_addr = htonl(0x0a000200) }; /* 10.0.2.0 */
+    struct in_addr mask = { .s_addr = htonl(0xffffff00) }; /* 255.255.255.0 */
     struct in_addr host = { .s_addr = htonl(0x0a000202) }; /* 10.0.2.2 */
     struct in_addr dhcp = { .s_addr = htonl(0x0a00020f) }; /* 10.0.2.15 */
     struct in_addr dns  = { .s_addr = htonl(0x0a000203) }; /* 10.0.2.3 */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
  2009-07-10 17:37       ` Jan Kiszka
@ 2009-07-10 17:45         ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2009-07-10 17:45 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Avi Kivity

Jan Kiszka wrote:
> The one caused by Ram Pai's colon patch - but it was unrelated to this
> one.
>   

That's been reverted.

>> It's reproducible without -snapshot and reproducible directly on top of
>> master (minus all the crap in staging).
>>     
>
> Hmpf, my bad. Use this patch instead:
>   

That did the trick, thanks.

-- 
Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-10 17:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 15:29 [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0 Jan Kiszka
2009-07-10 17:16 ` Anthony Liguori
2009-07-10 17:20   ` Jan Kiszka
2009-07-10 17:25     ` Anthony Liguori
2009-07-10 17:37       ` Jan Kiszka
2009-07-10 17:45         ` Anthony Liguori

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).