From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuiKh-0001JB-OP for qemu-devel@nongnu.org; Tue, 19 May 2015 10:17:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuiKc-000894-2s for qemu-devel@nongnu.org; Tue, 19 May 2015 10:17:23 -0400 Message-ID: <555B45E2.5090008@redhat.com> Date: Tue, 19 May 2015 08:17:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431519294-8873-1-git-send-email-M.Cerveny@computer.org> <1431519294-8873-2-git-send-email-M.Cerveny@computer.org> <555B31D9.2090806@suse.de> <555B4127.4030700@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pbgDKAhTOj2HeDwASa68pXfrWQNXAwtDX" Subject: Re: [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Martin Cerveny Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster , Luiz Capitulino , Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pbgDKAhTOj2HeDwASa68pXfrWQNXAwtDX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/19/2015 08:12 AM, Martin Cerveny wrote: > Hello. >=20 > On Tue, 19 May 2015, Eric Blake wrote: >> On 05/19/2015 06:51 AM, Andreas F=C3=A4rber 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 >>>> --- >>>> 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? >>>> +if len(connection) =3D=3D 2: >>>> + try: >>>> + port =3D int(connection[1]) >>>> + except ValueError: >>>> + raise QMPBadPort >>>> + connection =3D ( connection[0], port ) >> >> Won't that mishandle IPv6 connections, such as something like [::1]:80= 00 >> for connecting to port 8000 on localhost, since it splits into more th= an >> 2 pieces when splitting on :? >=20 > Yes, this is problem, but I copy-paste the same construct from > scripts/qmp/qmp-shell to be compatible. Might be worth mentioning that, as justification in the commit message. > Is the IPv6 support for utilities mandatory ? I don't have any strong feelings about it (I'm okay if you don't). But others might. > If yes I can make V2. If so, it would be good to fix qmp-shell, too - which makes it sound like it would be a separate commit. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pbgDKAhTOj2HeDwASa68pXfrWQNXAwtDX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVW0XiAAoJEKeha0olJ0Nqq5IIAJ+Zljc7AASTAuzH0nfMcNIC u732LDJQDvhypQQ6gsAO519uWTKIXcAkNvWhCVx17eG+lUYCx0i9MbU2h4ASwRdf LdouaJtbJL+qqoFvmGpdjQwW1jWs6Eg9xkenttDT+AM7zH4QZBBaw9xwPpvNEtyW gaSolUIeRya9aYv81Ko6ec4Iu0IUzRPGFLMJg7vQ/FsgD5u/LiTN43S2IIvYRLNo MNrzfeMsjd8szFSLyDSJ5PxXgFRrj65kavFOtQ/vJIWV5Ccz//1KfbNUwsi4NWgT ee0JMoFVIGyDlbMf2l6YvHK2VOfsFsTUeebl4CMJXN7MiGAwW8S2kefgQMtqqZU= =GTki -----END PGP SIGNATURE----- --pbgDKAhTOj2HeDwASa68pXfrWQNXAwtDX--