From patchwork Tue Oct 22 14:55:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 1181436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="FyqNDoK5"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46yGmH3n0Yz9sPh for ; Wed, 23 Oct 2019 01:56:14 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 64DE81016; Tue, 22 Oct 2019 14:56:10 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C6407FFA for ; Tue, 22 Oct 2019 14:56:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id ABD0089C for ; Tue, 22 Oct 2019 14:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571756166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2OKGDGizLb5tsSrJyGKuZ7BBqeVAwGVd9uuLUyoKWKc=; b=FyqNDoK5wl3BMYQc/0d8TaM6X0fM5u0vFrUtPk+71/emDUetVKCovALzX+IVzlP6NAWuY4 6U/rH7H+/ZhkpsDF4i3VpfRild0q1L9jyKGUiKSZtU5XG7TWJatSvHiyPh1F+9y74eRhCP YeQIeWgsrZUnN4NkelnXnmh3UHJIXkg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-258-e9Wkx6y0O5mZfgi-WRJSAQ-1; Tue, 22 Oct 2019 10:56:01 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F2F0800D4E for ; Tue, 22 Oct 2019 14:56:00 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D0DF5D6A9 for ; Tue, 22 Oct 2019 14:56:00 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Tue, 22 Oct 2019 10:55:58 -0400 Message-Id: <20191022145559.11343-1-aconole@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: e9Wkx6y0O5mZfgi-WRJSAQ-1 X-Mimecast-Spam-Score: 0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 1/2] ovs-tcpundump: exit when getting version X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Running 'ovs-tcpundump -V' will cause ovs-tcpundump to start processing on stdin. Instead, print the version and exit. Signed-off-by: Aaron Conole --- utilities/ovs-tcpundump.in | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in index b20730ec9..1ec4f2acc 100755 --- a/utilities/ovs-tcpundump.in +++ b/utilities/ovs-tcpundump.in @@ -47,6 +47,7 @@ if __name__ == "__main__": usage() elif key in ['-V', '--version']: print("ovs-tcpundump (Open vSwitch) @VERSION@") + sys.exit(0) else: sys.exit(0) From patchwork Tue Oct 22 14:55:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 1181437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Fmy/GP3Y"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46yGn2715Fz9sPf for ; Wed, 23 Oct 2019 01:56:54 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0FBB0101A; Tue, 22 Oct 2019 14:56:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AAB83FFA for ; Tue, 22 Oct 2019 14:56:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 123BF8A7 for ; Tue, 22 Oct 2019 14:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571756164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5L89ILIrU4OM9u+T3JB7iwbAtZzuB3B/ZzmwRG7s55Y=; b=Fmy/GP3YqLAix/Fd8JxsKwYgtPt2Pkf2DSyBfeQINIsWp73EcyNTJJCcuZSNyK0TjEu6WI oKyORtU7hoiymA3HQyFKNWp+6sQHQda9yQI6WBHskKQrwDNoySMIEmiHRt3jou1e9CxQ4J 1oWFHBGu2VU/QXt4/sDbWtQWksmUCC0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-3hAGTCgnO_CM_phvtML9rw-1; Tue, 22 Oct 2019 10:56:03 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id F3660476 for ; Tue, 22 Oct 2019 14:56:00 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1ACB5D6B0 for ; Tue, 22 Oct 2019 14:56:00 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Tue, 22 Oct 2019 10:55:59 -0400 Message-Id: <20191022145559.11343-2-aconole@redhat.com> In-Reply-To: <20191022145559.11343-1-aconole@redhat.com> References: <20191022145559.11343-1-aconole@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 3hAGTCgnO_CM_phvtML9rw-1 X-Mimecast-Spam-Score: 0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 2/2] ovs-tcpundump: allow multiple packet lengths X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The tcpundump tool expects all packets to be a length which aligns to exactly a 4-nibble boundary. This means packets like DNS requests will be stripped before being correctly processed. Fix this by allowing at least two nibbles (or one byte) alignment. Signed-off-by: Aaron Conole --- utilities/ovs-tcpundump.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in index 1ec4f2acc..ede5448b4 100755 --- a/utilities/ovs-tcpundump.in +++ b/utilities/ovs-tcpundump.in @@ -57,7 +57,7 @@ if __name__ == "__main__": sys.exit(1) packet = '' - regex = re.compile(r'^\s+0x([0-9a-fA-F]+): ((?: [0-9a-fA-F]{4})+)') + regex = re.compile(r'^\s+0x([0-9a-fA-F]+): ((?: [0-9a-fA-F]{2,4})+)') while True: line = sys.stdin.readline() if line == "":