From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id ABA4E5A026F for ; Fri, 8 Sep 2023 03:50:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1694137797; bh=m8LNMOr1Z1pjMDAgitTLNvKDiYP0wG1P1QO+onDJUPw=; h=From:To:Cc:Subject:Date:From; b=DCyrsPzf+vTp2gXSEp1ImKKMEoyhEF1wTmxHthGJmEaR9lgWk0duh5RdHFK+Bf/TL HYJyw3Qf/I74tyKjMLUBPcrWNovnqfU4rhGcKpy6pqDLboXKgdOsOq1x67buTPeL2w pe4+4ybHWtoJOQkfDWQ+4Axob6q8O6ph5rgXvzKI= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RhfF101Rzz4xFj; Fri, 8 Sep 2023 11:49:56 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/8] Fix a number of bugs with handling of TCP packets from tap Date: Fri, 8 Sep 2023 11:49:45 +1000 Message-ID: <20230908014953.822952-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: NR5FZMZ5WMDGU7N7EI2IBNUOZ7BVXV7M X-Message-ID-Hash: NR5FZMZ5WMDGU7N7EI2IBNUOZ7BVXV7M X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: jlesev@gmail.com, David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In the course of investigating bug 68, I discovered a number of pretty serious bugs in how we handle various cases in tcp_tap_handler() and tcp_data_from_tap(). This series fixes a number of them. Note that while I'm pretty sure the bugs fixed here are real, I haven't yet positively traced how they lead to the symptoms in bug 68 - I'm still waiting on the results from some special instrumentation to track that down. Link: https://bugs.passt.top/show_bug.cgi?id=68 David Gibson (8): tcp, tap: Correctly advance through packets in tcp_tap_handler() udp, tap: Correctly advance through packets in udp_tap_handler() tcp: Remove some redundant packet_get() operations tcp: Never hash match closed connections tcp: Return consumed packet count from tcp_data_from_tap() tcp: Correctly handle RST followed rapidly by SYN tcp: Consolidate paths where we initiate reset on tap interface tcp: Correct handling of FIN,ACK followed by SYN tap.c | 29 ++++++++++-------- tcp.c | 98 +++++++++++++++++++++++++++++++---------------------------- tcp.h | 2 +- udp.c | 15 ++++----- udp.h | 2 +- 5 files changed, 78 insertions(+), 68 deletions(-) -- 2.41.0