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 3C0B55A005E for ; Thu, 16 Feb 2023 04:45:19 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PHLSD2pZFz4x89; Thu, 16 Feb 2023 14:45:16 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1676519116; bh=AGtyTbXDlBxTEMrDo0SrrZYGCcwbDPJ9c+B/cmkij/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i9ly15qwdOJW2Ix/PxDkHzm/pbpJO3I7PrI6t1GN1oCU/NIA172keC0VWaZdTNbwn dFtls3LOnLvVvid07fq4qMjFym/BlGkxuXerARfcrfL5+pMAD3K3agkorp/y2P7xVc KoxUmUCwCkZSVO8UVv1FS1DrjRC4duEk8tFlQtyU= Date: Thu, 16 Feb 2023 13:44:20 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] passt.1: Fix typo, improve wording in examples of port forwarding specifiers Message-ID: References: <20230216010900.2224288-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s7pcNhC86hxm2JXb" Content-Disposition: inline In-Reply-To: <20230216010900.2224288-1-sbrivio@redhat.com> Message-ID-Hash: YUQXIIUIEEBQJ4ZPO6Y5C6KCE6JMHASB X-Message-ID-Hash: YUQXIIUIEEBQJ4ZPO6Y5C6KCE6JMHASB 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, Laine Stump , Yalan Zhang 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: --s7pcNhC86hxm2JXb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2023 at 02:09:00AM +0100, Stefano Brivio wrote: > Based on a patch from Laine, and reports from Laine and Yalan: fix > the "22-80:32-90" example, and improve wording for the other ones: > instead of using "to" to denote the end of a range, use "between ... > and", so that it's clear we're *not* referring to target ports. >=20 > Reported-by: Laine Stump > Reported-by: Yalan Zhang > Fixes: da20f57f19dc ("passt, qrap: Add man pages") > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson Although, a few additional refinements suggested below: > --- > passt.1 | 29 ++++++++++++++++------------- > 1 file changed, 16 insertions(+), 13 deletions(-) >=20 > diff --git a/passt.1 b/passt.1 > index 528763b..ec09c22 100644 > --- a/passt.1 > +++ b/passt.1 > @@ -338,7 +338,7 @@ Examples: > .RS > .TP > -t 22 > -Forward local port 22 to 22 on the guest > +Forward local port 22 to port 22 on the guest > .TP > -t 22:23 > Forward local port 22 to port 23 on the guest > @@ -347,10 +347,11 @@ Forward local port 22 to port 23 on the guest > Forward local ports 22 and 25 to ports 22 and 25 on the guest > .TP > -t 22-80 > -Forward local ports 22 to 80 to corresponding ports on the guest > +Forward local ports between 22 and 80 to corresponding ports on the guest > .TP > --t 22-80-32:90 > -Forward local ports 22 to 80 to corresponding ports on the guest plus 10 > +-t 22-80:32-90 > +Forward local ports between 22 and 80 to corresponding ports on the gues= t, plus > +10 I find it a bit hard to parse how the "plus 10" attaches to the rest of the sentence. I'd suggest: Forward local ports between 22 and 80 to ports between 32 and 90 on the guest. =46rom a pedantic point of view that's less precise, but I think the meaning of it going to be clearer in practice to most readers > .TP > -t 192.0.2.1/22 > Forward local port 22, bound to 192.0.2.1, to port 22 on the guest > @@ -359,10 +360,10 @@ Forward local port 22, bound to 192.0.2.1, to port = 22 on the guest > Forward local port 22, bound to 192.0.2.1 and interface eth0, to port 22 > .TP > -t 2000-5000,~3000-3010 > -Forward local ports 2000 to 5000, but not 3000 to 3010 > +Forward local ports between 2000 and 5000, but not between 3000 to 3010 I's suggest: Forward local ports between 2000 and 5000, except for those between 3000 and 3010. > .TP > -t 192.0.2.1/20-30,~25 > -Forward local ports 20 to 24, and 26 to 30, bound to 192.0.2.1 > +Forward local ports between 20 to 24, and between 26 to 30, bound to 192= =2E0.2.1 Here you have both "between" and "to". Maybe, For the local address 192.0.2.1, forward ports between 20 and 24 and between 26 and 30. > .TP > -t ~20000-20010 > Forward all ports to the guest, except for the range from 20000 to 20010 > @@ -425,12 +426,13 @@ Forward local port 22 to port 23 in the target name= space > Forward local ports 22 and 25 to ports 22 and 25 in the target namespace > .TP > -t 22-80 > -Forward local ports 22 to 80 to corresponding ports in the target namesp= ace > -.TP > --t 22-80-32:90 > -Forward local ports 22 to 80 to corresponding ports plus 10 in the target > +Forward local ports between 22 and 80 to corresponding ports in the targ= et > namespace > .TP > +-t 22-80:32-90 > +Forward local ports between 22 and 80 to corresponding ports, plus 10, i= n the > +target namespace > +.TP Same suggestion regarding "plus 10" as above. > -t 192.0.2.1/22 > Forward local port 22, bound to 192.0.2.1, to port 22 in the target name= space > .TP > @@ -438,13 +440,14 @@ Forward local port 22, bound to 192.0.2.1, to port = 22 in the target namespace > Forward local port 22, bound to 192.0.2.1 and interface eth0, to port 22 > .TP > -t 2000-5000,~3000-3010 > -Forward local ports 2000 to 5000, but not 3000 to 3010 > +Forward local ports between 2000 and 5000, but not between 3000 to 3010 Same suggestion to use "except for" > .TP > -t 192.0.2.1/20-30,~25 > -Forward local ports 20 to 24, and 26 to 30, bound to 192.0.2.1 > +Forward local ports between 20 to 24, and between 26 to 30, bound to 192= =2E0.2.1 And again. > .TP > -t ~20000-20010 > -Forward all ports to the namespace, except for the range from 20000 to 2= 0010 > +Forward all ports to the target namespace, except for the range from 200= 00 to > +20010 Suggest, Forward all ports to the namespace, except for those between 20000 and 20010. > .RE > =20 > IPv6 bound ports are also forwarded for IPv4. --=20 David Gibson | 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 --s7pcNhC86hxm2JXb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmPtmH4ACgkQzQJF27ox 2GcvnRAAklBvtOYUbvfCavxOuzSwtE6DCKS2rpAudre4694Ad8rywvSt8MMBe4zx fk9EHCAll3cyiK0yb7DfUHK5tLIrqtXPOA2ACcx9ViKvg7W0t6ygj7c/zNYSUPjK g4njHnmsIX0kNjYOBFDD8iB4p22rUsOoX/wvscqcplzNrBqNmethIv1N90GZQVaw hdSwElK2EVqvNQHKF+1Kkh68XohCqo04THHc1iG8xpTAtnjpo8j1cWLGHwvN+qgk w+gXZR45zyq81kceeLbnODEKbyVU44r6+DJKdqCQ12p2Z4ENRAmJOmxIE5psFkbE 7nGOVzDtzrvfP3TOv7Sh/p11n4CuToBnWGMDYhY+k19oXzLNfMsKn9PNf7V9wDXP 9PFRV2h2zbECKcctdtAal6+4a6a7g8r9NAfKzRnVy082pO1jsGIeVtxcqfPtp6PW C/zfgMwmXhW+qBSJHWD5VHtIkLiETwh9OhwWRuEPKTPOwXb1+4XlQpqQp5h+YZd/ aJD7yXz2CHglKaz9yUuhiTdAwf8rn18PYkbFqvKJWHuDRPgAYyoalZWTO/RILj90 7UWhgOSIY7XRqvVJemPENHR2JtJaLC2UCiK1DKlJviVu0Cjvoj1KeGbbIxj9TmDn suDteHOvJeWuQSp+j3CN4BqyUIb0M54mhUYHlKpQboW+1ZplOTc= =J9jT -----END PGP SIGNATURE----- --s7pcNhC86hxm2JXb--