From patchwork Thu Oct 3 17:46:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1171303 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="lZ8VXWxF"; 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 46kgRH6G2sz9sPZ for ; Fri, 4 Oct 2019 03:46:19 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 03CEED9C; Thu, 3 Oct 2019 17:46:17 +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 152A1D91 for ; Thu, 3 Oct 2019 17:46:16 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8463819B for ; Thu, 3 Oct 2019 17:46:15 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id a3so2164847pgm.13 for ; Thu, 03 Oct 2019 10:46:15 -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=Fxhsg5K4PTadHEHqRdUThbHVGfT2E2ETrkAj/wCMM6Q=; b=lZ8VXWxFtqJApyRvYQMReYDG+iLhAZn25oY3yOdUtRmymeq6DC/yn2fY4ezyxD8eAY XxFQvflKHk4WtrRiTWEFJAPN2lQpeKPQxnsaOHhzmKZHL3p/eQJmYG8MhSnQioFKpnq8 jory8+j+aMGOMPJzZdgJhg3vnyzVQhrO35YoVMgSzP+WlR/aWrRtJnn6DS9MxWmELlJ7 oA5FSk+wojkWB5eBord3iz+TJT3NSR8SJfihBdoX0B8cb+Rqp9j8q4oeI/81NF5eahBt gIBeqjXOvuPd4YkCyfWoT15KMWhmLDwOCj2rOjrMT+vQC42YBMgUWhvXUoXW73wpBM8w tZwQ== 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=Fxhsg5K4PTadHEHqRdUThbHVGfT2E2ETrkAj/wCMM6Q=; b=rr1l9DwwOjeOZEEvb9+MGVKnTXemtssgulN3sYF8F+Q+LMb78l22WIM/3BuMDdYmau lq6Inb/jfRO+0kdgVzPk/tMMBKy2BAmoFzGheq19FEEN/K8MihvwGfhZSsbXocQsAgfe 8vbdncQabSh2hrYOzCBDqnzXBh/Q0UcDsUxkY6OLG4gdYrISpUJd4PEZq0N1NxIIOCt8 /8rz9SxxC2r7zbqAQ/FFbV1/fTadual1Jx+NsbdIBVAPah92GZ2SVZfF0Nz0JgJRtoud tOpHwH1c9DPZN2cvae415/PQWdjXYsr+tWWFJTc04NqNDq4Tq7LQF1Q2p+khAu2nORrO PbSQ== X-Gm-Message-State: APjAAAU/Vr0SeBvZHx30a/wevCIg4Gm66r7ZJhBlhHrvsNsRIEk+tm2l 1ROMcRNMqmrDOqDy1ew4yaFguAun X-Google-Smtp-Source: APXvYqw/SGYllJilfcLGlL7BRcM1w8S0aAYnCWPcAmYYchMfNF8EaIN8Itj1F+s8mFtrsHRXUujWfQ== X-Received: by 2002:a63:ba47:: with SMTP id l7mr10622858pgu.201.1570124774370; Thu, 03 Oct 2019 10:46:14 -0700 (PDT) Received: from gizo.domain (97-115-119-26.ptld.qwest.net. [97.115.119.26]) by smtp.gmail.com with ESMTPSA id ce16sm2746159pjb.29.2019.10.03.10.46.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Oct 2019 10:46:13 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 3 Oct 2019 10:46:09 -0700 Message-Id: <1570124769-32567-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 v2] 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 --- V2 - Break up long lines with dnl to help with email formatting --- tests/system-traffic.at | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/system-traffic.at b/tests/system-traffic.at index bfc6bb5..9afd818 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -3245,6 +3245,32 @@ 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=52540003287c525400444ab586dd6006f70605b02c4020010001000000000000000000000020200100010000000000000000000000101100000134e88deb13891389080803136161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616"dnl +"16161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"dnl +"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616"dnl +"1616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161, actions=ct(table=1)"]) + +AT_CHECK([ovs-ofctl packet-out br0 "packet=52540003287c525400444ab586dd6006f70602682c402001000100000000000000000000002020010001000000000000000000000010110005a834e88deb6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616"dnl +"161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161, actions=ct(table=1)"]) + +AT_CHECK([ovs-ofctl packet-out br0 "packet=52540003287c525400444ab586dd6006f706033d1140200100010000000000000000000000202001000100000000000000000000001013891389033d923861616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616"dnl +"1616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161610a, 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 +AT_CLEANUP + AT_BANNER([conntrack - L7]) AT_SETUP([conntrack - IPv4 HTTP])