[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/30] util: socket: Add missing localaddr and localp
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 03/30] util: socket: Add missing localaddr and localport option for DGRAM socket |
Date: |
Wed, 3 Jun 2015 16:08:23 +0300 |
From: Peter Krempa <address@hidden>
The 'socket_optslist' structure does not contain the 'localaddr' and
'localport' options that are parsed in case you are creating a
'connect' type UDP character device.
I've noticed it happening after commit f43e47dbf6de24db20ec9b588bb6cc762
made qemu abort() after seeing the invalid option.
A minimal reproducer for the case is:
$ qemu-system-x86_64 -chardev
udp,id=charrng0,host=127.0.0.1,port=1234,localaddr=,localport=1234
qemu-system-x86_64: -chardev
udp,id=charrng0,host=127.0.0.1,port=1234,localaddr=,localport=1234: Invalid
parameter 'localaddr'
Aborted (core dumped)
Prior to the commit mentioned above the error would be printed but the
value for localaddr and localport was simply ignored. I did not go
through the code to find out when it was broken.
Add the two fields so that the options can again be parsed correctly and
qemu doesn't abort().
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1220252
Signed-off-by: Peter Krempa <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
util/qemu-sockets.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 22c8c4c..f9ad34e 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -45,6 +45,12 @@ QemuOptsList socket_optslist = {
.name = "port",
.type = QEMU_OPT_STRING,
},{
+ .name = "localaddr",
+ .type = QEMU_OPT_STRING,
+ },{
+ .name = "localport",
+ .type = QEMU_OPT_STRING,
+ },{
.name = "to",
.type = QEMU_OPT_NUMBER,
},{
--
2.1.4
- [Qemu-devel] [PULL 00/30] Trivial patches for 2015-06-03, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 07/30] hw/i386/acpi-build: decref after use, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 10/30] hw/alpha/dp264.c: Fix memory leak spotted by valgrind, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 03/30] util: socket: Add missing localaddr and localport option for DGRAM socket,
Michael Tokarev <=
- [Qemu-devel] [PULL 05/30] hw/i386/pc_piix: Fix memory leak, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 04/30] docs/writing-qmp-commands: fix a typo, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 17/30] hw/timer/arm_timer.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 08/30] device-tree: Make a common-obj, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 28/30] slirp: use less predictable directory name in /tmp for smb config (CVE-2015-4037), Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 15/30] hw/isa/lpc_ich9.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 24/30] hw/arm/nseries.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 06/30] hw/ide/pci: Fix memory leak, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 25/30] hw/display/tc6393xb.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03
- [Qemu-devel] [PULL 22/30] hw/unicore32/puv3.c: Fix misusing qemu_allocate_irqs for single irq, Michael Tokarev, 2015/06/03