From patchwork Thu Oct 3 15:35:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1171254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PR/Jp5co"; 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 46kcXt2zNGz9sCJ for ; Fri, 4 Oct 2019 01:35:57 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E2CE7FDF; Thu, 3 Oct 2019 15:35:54 +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 E0A2CFDF for ; Thu, 3 Oct 2019 15:35:53 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 54D951FB for ; Thu, 3 Oct 2019 15:35:53 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id x127so2006978pfb.7 for ; Thu, 03 Oct 2019 08:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rZ3FPB45pJZFcXGBN4DRO0XQQFwzoTEQhSI/NPnxOqw=; b=PR/Jp5coZG4ULSa67afQaTY3jeZRHAKBMPCe5c6DKN0SGbDNXYMDJmZRMBjqUY6QqB Nldge3R8FRPvGa/ITZcufllo+bU+GzoR+AMfQCaotqD8x6Dn8rZBmQU2gUsc/z/hsaTU ApLUD91cJC8RUBHtkCG7pcHt6Vj4kR7aLd45xXbgV4+DLWBG8zAECyi67P9Ao81rdY4l TqkGL2imIiUe9h0zSS6T9PhXZyXNxs5I8D7zXsXlm45IV95BI2CqRrQlsArJBxgoIo+b 9u12+Esf5dI1GyhHLwdscLbjjVWQ6rcsrxeTIe36oF9jAbwjQv86u1UNmWUXqwQr9eRL 7D0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rZ3FPB45pJZFcXGBN4DRO0XQQFwzoTEQhSI/NPnxOqw=; b=UvKmCSXiWsOIQ53tYtn2iiV/4XuLUIu/naQIbQg/tsjHrJNgMwERqa7MiuCRgxQNuk Q9VUGMXmaAl341C71SmNygnjK6lY4dSiojdR00PL157Abks0PC1GVH5QDcQn4m6CMtRb MX6KU/ftLY8eTuA7x0NyWcuTyra307tS00rEV4WVoVWgVDOk09i9iq01CFAMV6BTrGuH ws/SAs9qlAu3HWQyDhXbPYZ6AyPSad1rn4Zlbpkkmkc8LHGujMET0DDBMeWiNcacqBbg QuP9lYzhmQ4WgciI6Cnpy2GiUfgafgSCr7sZjd57ARUQOunPL+Gdn5bae52rHRAI/7MA hr/g== X-Gm-Message-State: APjAAAWWjCNbcSKs/zKWZD0LXmmjyo88vWap7xGBFqNFs+uGfj95razk 2xR7YF/WIIFTN1NjpTSh1kiYOXcR X-Google-Smtp-Source: APXvYqy5qiUu/pKJbNb7Fg21LE83nt2cTp9AzbHUyavdGZ8g4TRse5qBqqfDEbvg+4RMMM/3b2SWRQ== X-Received: by 2002:a17:90a:3ae7:: with SMTP id b94mr11342969pjc.63.1570116952510; Thu, 03 Oct 2019 08:35:52 -0700 (PDT) Received: from gizo.domain (97-115-119-26.ptld.qwest.net. [97.115.119.26]) by smtp.gmail.com with ESMTPSA id o185sm5256651pfg.136.2019.10.03.08.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Oct 2019 08:35:51 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 3 Oct 2019 08:35:42 -0700 Message-Id: <1570116942-30058-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] tests: Add check for correct l3l4 conntrack frag reassembly 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Two commits recently fixed an issue with setting the corrrect l3 and l4 flow information when conntrack reassembles packet fragments. c98f776 datapath: Clear the L4 portion of the key for "later" fragments 2609173 datapath: Properly set L4 keys on "later" IP fragments This test checks for regressions that might break this feature. It counts on the fact that when the bug is present the udp src port will not be correct. It will either be zero or else some other garbage value. So the test feeds some fragments through for reassembly and then checks to make sure that the udp srce port is actually the correct value of 5001. Tested by reverting the above commits and observing that the test then fails. Signed-off-by: Greg Rose --- tests/system-traffic.at | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) +AT_CLEANUP + AT_BANNER([conntrack - L7]) AT_SETUP([conntrack - IPv4 HTTP]) diff --git a/tests/system-traffic.at b/tests/system-traffic.at index bfc6bb5..804a3d2 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -3245,6 +3245,27 @@ AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP +AT_SETUP([conntrack - fragment reassembly test]) +CHECK_CONNTRACK() +OVS_TRAFFIC_VSWITCHD_START() + +AT_DATA([flows.txt], [dnl +action=normal +]) + +AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt]) + +AT_CHECK([ovs-ofctl packet-out br0 "packet=52540003287c525400444ab586dd6006f70605b02c4020010001000000000000000000000020200100010000000000000000000000101100000134e88deb138913890808031361616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616 16161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161, actions=ct(table=1)"]) + +AT_CHECK([ovs-ofctl packet-out br0 "packet=52540003287c525400444ab586dd6006f70602682c402001000100000000000000000000002020010001000000000000000000000010110005a834e88deb616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161, actions=ct(table=1)"]) + +AT_CHECK([ovs-ofctl packet-out br0 "packet=52540003287c525400444ab586dd6006f706033d1140200100010000000000000000000000202001000100000000000000000000001013891389033d9238616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161610a, actions=ct(table=1)"]) + +AT_CHECK([ovs-appctl dpctl/dump-flows | head -2 | tail -1 | grep -q -e ["]udp[(]src=5001["]]) + +OVS_TRAFFIC_VSWITCHD_STOP