From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id ED7CD5A0262 for ; Tue, 21 Mar 2023 15:02:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679407363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mCT0gO//5STeG/tg4WKAgrhzY6C7Kz/Wg+dqOAkzls0=; b=NL4+QHvdwdKosKOaCcWIZgLIhUmFil5S6/HHWNs++rMzcVqHeamph9dNrIkjbDHvry6zaK ZnbEZjU9jvRDSImJByLL1Ag+9+h0soXhlDshjfx4VSRlAvluG48q5bB+H2LiaRaJTX2S+P k8g3DThF6FvEixtJ0CD7UYawf6uwwDY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-70-p7aa4FWDM12J9G9QhMWsZQ-1; Tue, 21 Mar 2023 10:02:41 -0400 X-MC-Unique: p7aa4FWDM12J9G9QhMWsZQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2805D85530F; Tue, 21 Mar 2023 14:02:41 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E6F962027144; Tue, 21 Mar 2023 14:02:40 +0000 (UTC) Date: Tue, 21 Mar 2023 15:02:30 +0100 From: Stefano Brivio To: Paul Holzinger Subject: Re: [PATCH] pasta: fix tcp port forwarding in auto mode Message-ID: <20230321150230.65b81eaf@elisabeth> In-Reply-To: <462fd5de-1d51-2a1d-a5f7-aeb755dadb2e@redhat.com> References: <20230320181034.87131-1-pholzing@redhat.com> <20230321091848.4a982a40@elisabeth> <462fd5de-1d51-2a1d-a5f7-aeb755dadb2e@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: LAWIEYZQ7DPM5FDI6OUW4SAFQRZRQPDV X-Message-ID-Hash: LAWIEYZQ7DPM5FDI6OUW4SAFQRZRQPDV X-MailFrom: sbrivio@redhat.com 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: passt-dev@passt.top, 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: On Tue, 21 Mar 2023 14:55:17 +0100 Paul Holzinger wrote: > On 21/03/2023 09:18, Stefano Brivio wrote: > > Thanks for the patch! > > > > On Mon, 20 Mar 2023 19:10:34 +0100 > > Paul Holzinger wrote: > > > >> The logic in tcp_timer() was inverted. fwd_out should expose the host > >> ports in the ns. Therfore it must read the ports on the host and then > >> bind them in the netns. The same for fwd_in which checks ports in the > >> ns and then exposes them on the host. > >> > >> Note that this only fixes tcp ports, udp does not seems to work at all > >> right now with the auto mode. > > Note that for UDP there's no periodic scan, "auto" just checks bound > > ports when pasta starts: > > > > -u, --udp-ports spec > > Configure UDP port forwarding to namespace. spec is as described > > for TCP above, and the list of ports is derived from listening > > sockets reported by /proc/net/udp and /proc/net/udp6, see > > proc(5), when pasta starts (not periodically). > > Ok this makes sense then, is there a bug to track this? Because without > it auto mode for UDP is useless for my Podman use case. No, sorry, not yet, feel free to file one, or I can do that later today. Right now not even what the man page says works, I'll post a patch in a bit. -- Stefano