[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax |
Date: |
Tue, 19 May 2015 07:56:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 05/19/2015 06:51 AM, Andreas Färber wrote:
> Am 13.05.2015 um 14:14 schrieb Martin Cerveny:
>> Add network syntax parsing (ip address, port) to qom-* scripts.
>>
>> Signed-off-by: Martin Cerveny <address@hidden>
>> ---
>> scripts/qmp/qom-fuse | 13 ++++++++++++-
>> scripts/qmp/qom-get | 12 +++++++++++-
>> scripts/qmp/qom-list | 12 +++++++++++-
>> scripts/qmp/qom-set | 12 +++++++++++-
>> scripts/qmp/qom-tree | 12 +++++++++++-
>> 5 files changed, 56 insertions(+), 5 deletions(-)
>
> Could some Python guru please take a look at this?
That disqualifies me (still a python newbie), but I still see something
questionable:
>>
>> -srv = QEMUMonitorProtocol(socket_path)
>> +connection = socket_path.split(':')
>> +if len(connection) == 2:
>> + try:
>> + port = int(connection[1])
>> + except ValueError:
>> + raise QMPBadPort
>> + connection = ( connection[0], port )
Won't that mishandle IPv6 connections, such as something like [::1]:8000
for connecting to port 8000 on localhost, since it splits into more than
2 pieces when splitting on :?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax, Daniel P. Berrange, 2015/05/19
[Qemu-devel] [PATCH 2/2] scripts: qom-tree: add support of path as argument, Martin Cerveny, 2015/05/13