From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id AE00D5A026A; Wed, 26 Oct 2022 18:25:31 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 2/4] tap: Trace received (outbound) ICMP packets in debug mode, too Date: Wed, 26 Oct 2022 18:25:29 +0200 Message-Id: <20221026162531.545374-3-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221026162531.545374-1-sbrivio@redhat.com> References: <20221026162531.545374-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: DVCFSXRS5XIS6RBPERF2CV67RUKT6F3B X-Message-ID-Hash: DVCFSXRS5XIS6RBPERF2CV67RUKT6F3B X-MailFrom: sbrivio@passt.top 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: Paul Holzinger X-Mailman-Version: 3.3.3 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: This only worked for ICMPv6: ICMP packets have no TCP-style header, so they are handled as a special case before packet sequences are formed, and the call to tap_packet_debug() was missing. Fixes: bb708111833e ("treewide: Packet abstraction with mandatory boundary checks") Signed-off-by: Stefano Brivio --- tap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tap.c b/tap.c index 3f78c99..4dcff4f 100644 --- a/tap.c +++ b/tap.c @@ -463,6 +463,8 @@ resume: if (c->no_icmp) continue; + tap_packet_debug(iph, NULL, NULL, 0, NULL, 1); + packet_add(pkt, l4_len, l4h); icmp_tap_handler(c, AF_INET, &iph->daddr, pkt, now); continue; -- 2.35.1