[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] slirp: Fix default netmask to 255.255.255.0 |
Date: |
Fri, 10 Jul 2009 19:37:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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 <address@hidden>
>>>>
>>> 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 <address@hidden>
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 <address@hidden>
---
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 */