tags 546511 + patch fixed-upstream thanks This bug is fixed by upstream commit http://repo.or.cz/w/qemu.git?a=commit;h=ea053add attached as a patch
A simple workaround does also exist: Add a dummy "name=foo" parameter to the "-net socket" option. E.g. kvm -m 128 -hda /home/olive/ka-olive1.img -net nic,vlan=1,macaddr=02:00:00:00:01:01,model=i82559er -net socket,vlan=1,name=foo,listen=:10011 -nographic -serial mon:telnet:127.0.0.1:2101,server,nowait -monitor null -pidfile /home/olive/run/ka-olive1.pid Bjørn
From: aliguori <aligu...@c046a42c-6fe2-441c-8c8c-71466251a162> Date: Tue, 21 Apr 2009 19:56:11 +0000 (+0000) Subject: net: Fix -net socket,listen (Jan Kiszka) X-Git-Tag: v0.11.0-rc0~811 X-Git-Url: http://repo.or.cz/w/qemu.git?a=commitdiff_plain;h=ea053add net: Fix -net socket,listen (Jan Kiszka) In case no symbolic name is provided when requesting VLAN connection via listening TCP socket ('-net socket,listen=...'), qemu crashes. This fixes the cause. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/tr...@7196 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/net.c b/net.c index 7a1b2df..ff6230c 100644 --- a/net.c +++ b/net.c @@ -1472,7 +1472,7 @@ static int net_socket_listen_init(VLANState *vlan, } s->vlan = vlan; s->model = strdup(model); - s->name = strdup(name); + s->name = name ? strdup(name) : NULL; s->fd = fd; qemu_set_fd_handler(fd, net_socket_accept, NULL, s); return 0;

