From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=LMM5hVka; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id E91685A0271 for ; Thu, 09 Apr 2026 10:30:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1775723447; bh=O1sbNadZGbhR6s+Tl5Q97Bn24/ZMCelGl7T0RO0tHYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LMM5hVkaf62IAiJo6Wwm0Nc+CLjUI3iJtlvkN6XARczBeKLd0d2liZ6zGpOunGjFf 3wQKLHEi64a78ciILa8OXJvKVuQaIhMTr+pXNUPYOCnBrZRRRCToxWJX1KBAM2sZ47 +7t4PR5BJG8MRibWBKbzm6W8rxv/7XnKnMxiad1BFzdqtLM2cHL9xnhc90OPUy/TmH wNspnJ8rI824HHHPM784RkToh+AplzmBxdvSVrTQLWGY3Jebl6JR0SumnPjr1wyAQ9 HmCFzrykriyFtYk+TEb0iuuGguzfv/HZfFdl22rNjOUmwFWidmqoE0JuC9FmAlY9om HuL2541oVilTg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4frtRq6pHdz4wTW; Thu, 09 Apr 2026 18:30:47 +1000 (AEST) Date: Thu, 9 Apr 2026 18:30:39 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 12/18] conf: Don't be strict about exclusivity of forwarding mode Message-ID: References: <20260407031630.2457081-1-david@gibson.dropbear.id.au> <20260407031630.2457081-13-david@gibson.dropbear.id.au> <20260408234015.242166e9@elisabeth> <20260409094043.16d67825@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="M4P5J3JtUTgA4514" Content-Disposition: inline In-Reply-To: <20260409094043.16d67825@elisabeth> Message-ID-Hash: 4JQ3DQFBFZP7MYWC2YTCIVF44O5EXJEV X-Message-ID-Hash: 4JQ3DQFBFZP7MYWC2YTCIVF44O5EXJEV 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: passt-dev@passt.top 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: --M4P5J3JtUTgA4514 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 09, 2026 at 09:40:44AM +0200, Stefano Brivio wrote: > On Thu, 9 Apr 2026 10:12:07 +1000 > David Gibson wrote: >=20 > > On Wed, Apr 08, 2026 at 11:40:16PM +0200, Stefano Brivio wrote: > > > On Tue, 7 Apr 2026 13:16:24 +1000 > > > David Gibson wrote: > > > =20 > > > > Currently as well as building the forwarding tables, conf() maintai= ns a > > > > "forwarding mode" value for each protocol and direction. This prev= ents, > > > > for example "-t all" and "-t 40000" being given on the same command= line. > > > >=20 > > > > This restriction predates the forwarding table and is no longer rea= lly > > > > necessary. Remove the restriction, instead doing our best to apply= all the > > > > given options simultaneously. > > > >=20 > > > > * Many combinations previously disallowed will still be disallowed= because > > > > of conflicts between the specific generated rules, e.g. > > > > -t all -t 8888 > > > > (because -t all already listens on port 8888) > > > > * Some new combinations are now allowed and will work, e.g. > > > > -t all -t 40000 > > > > because 'all' excludes ephemeral ports (which includes 40000 on = default > > > > Linux configurations). =20 > > >=20 > > > This is slightly confusing though: > > >=20 > > > $ ./pasta -t auto -t 31337 > > > Forwarding configuration conflict: TCP [*]:31337 =3D> 31337 versus= TCP [*]:1-32767 =3D> 1-32767 (best effort) (auto-scan) =20 > >=20 > > You mean because the single port rule is redundant, but doesn't do > > something different, so not strictly speaking conflicting? >=20 > Right, yes. One might want to say something like "map all ports > automatically, but 31337 always", and that's not (much?) more > conflicting than "-t all -t 8888"... maybe. Yeah, maybe. I'm inclined to leave this kind of refinement until later, though - if people actually hit it in practice. There's a pretty easy workaround, since you can do: $ pasta -t auto,~31337 -t 31337 > > > but I don't see a practical way to "fix" it for the moment being, and > > > overall I'd say the new behaviour is better than the original one, so= I > > > don't really care. =20 > >=20 > > Ok. >=20 > --=20 > Stefano >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --M4P5J3JtUTgA4514 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIyBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmnXY64ACgkQzQJF27ox 2GfSGQ/3X8DBaT2IG4toNGb1GubiZ3PEURLKq5euiev2pjNo6t2XshWNeOYLo65E yyWkvSe9kdAc4T/WYunjVpr/yV/ELx+GzOQJU79ApOwTYFsopA1OyNh89J9RZkeU 8hhX9Fk4b6qEOctasv8XE7fjyIqwBx/2wxLX+H0TvTAzsvU/1lEzJYsGU/8cH5wN /l2BdwmSkFTBUZwNsb9riaxHEEZEQONQoBWLj1lt4QLfnNEXq7bj/N1v0R/frJNh LndLY11EpZ2esJ1MLe1nRZgHBcfROPowQkXDpM101qSDl1H4uSi8YgUG0ePB1M2d mRU3cpAw9EAWwcwLEuEZPydwVB4e8iIr6Tkbubb/HHTkgx3LwIWg9o6gHOhqEB75 IeXe5lWU9aW6OHF+Dp7b7nH55gaNRqdgTmxRZnrXeyOuYPKVeQAxA3iqvTMt0iPY 05sCHzv/FC4sfZuT48qVw9jkYPBiJESLiJ+XQUAL7vkS5hbaDrXPmRIB0eWvkl5M fNgFPNbwBIp1rUX/QUZLBzyw//UTBWklJASdeT3omdqOzf7QIp9DJuO7/qea3pAa P+MpVnXPCtg2itbTNkQOq4+N1UrgDeGaA4pyUcdhuGo3hUHZ8gc1QIIRowQJLqfx YIEtM5S+aDWMqNVltmprXIZ+WF/KARNZRE2weU7KGmfdw7zg5A== =8Qiw -----END PGP SIGNATURE----- --M4P5J3JtUTgA4514--