From nobody Sun Apr 28 20:19:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500366865757184.45865366678333; Tue, 18 Jul 2017 01:34:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2249861E48; Tue, 18 Jul 2017 08:34:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54BC377FF6; Tue, 18 Jul 2017 08:34:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A2EC51853E33; Tue, 18 Jul 2017 08:34:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6I8YGGd026074 for ; Tue, 18 Jul 2017 04:34:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 71F8A17A69; Tue, 18 Jul 2017 08:34:16 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id C523B5C684; Tue, 18 Jul 2017 08:34:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2249861E48 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2249861E48 From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 18 Jul 2017 10:34:09 +0200 Message-Id: <701d1ea9088710c04ba6a596623f54342e30ef85.1500366849.git.mprivozn@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: mkletzan@redhat.com Subject: [libvirt] [PATCH] wireshark: Adapt to tvb_new_subset() rename X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 18 Jul 2017 08:34:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In Wireshark commit of 7cd6906056922e4b8 (contained in v2.4.0) the tvb_new_subset() function was renamed to tvb_new_subset_length_caplen(). However, we can take the extra step and rename to tvb_new_subset_remaining() directly (see Wireshark commit 0ecfc7280cf3d7). The reasoning is that there is no other protocol in the packet than libvirt. Therefore, from the point that libvirt dissector takes over till the end of the packet it's all libvirt packet. Signed-off-by: Michal Privoznik --- tools/wireshark/src/packet-libvirt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/wireshark/src/packet-libvirt.c b/tools/wireshark/src/pac= ket-libvirt.c index a1f5a34f4..c15e9c340 100644 --- a/tools/wireshark/src/packet-libvirt.c +++ b/tools/wireshark/src/packet-libvirt.c @@ -313,7 +313,12 @@ dissect_libvirt_payload_xdr_data(tvbuff_t *tvb, proto_= tree *tree, gint payload_l payload_length -=3D 4; } =20 +#if WIRESHARK_VERSION < 200400 payload_tvb =3D tvb_new_subset(tvb, start, -1, payload_length); +#else + payload_tvb =3D tvb_new_subset_remaining(tvb, start); +#endif + #if WIRESHARK_VERSION < 1012000 payload_data =3D (caddr_t)tvb_memdup(payload_tvb, 0, payload_length); #else --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list