From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 2C4335A027A for ; Wed, 8 Mar 2023 23:45:15 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PX6pF5kjMz4xDh; Thu, 9 Mar 2023 09:45:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1678315509; bh=wcjAbdOxIkuJkW7srX4Fb1GHezuhRGIJ71UXP2Okpuo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gR+JHMB7CJRDOE7BVKo9XrYu7qo3Yrswko5sPAQW+pZRAOZ4VUpYjiWEOn40IWQXP 1BgCXMghTrbtEnV9cRbMLMsf8tPw4qu6fvy1fmcovbU+9qGIfC28LBA7+xuAxNxNlu 6rqBtAw3UOfWZA393Ew9FLW8NOdMkDptL8Y4Mtp8= Date: Thu, 9 Mar 2023 08:05:19 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 1/2] conf, passt.h: Rename "outbound" interface to "template" interface Message-ID: References: <20230308073449.2189570-1-sbrivio@redhat.com> <20230308073449.2189570-2-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4jKr9Jz5t1K/aHNA" Content-Disposition: inline In-Reply-To: <20230308073449.2189570-2-sbrivio@redhat.com> Message-ID-Hash: UDDEX3IFP25B4EVNYVFVPNLLT5NJJY4F X-Message-ID-Hash: UDDEX3IFP25B4EVNYVFVPNLLT5NJJY4F 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: --4jKr9Jz5t1K/aHNA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 08, 2023 at 08:34:48AM +0100, Stefano Brivio wrote: > In preparation for the next patch, make it clear that the first > routable interface fetched via netlink, or the one configured via > -i/--interface, is simply used as template to copy addresses and > routes, not an interface we actually use to derive the source address > (which will be _bound to_) for outgoing packets. >=20 > The man page and usage message appear to be already clear enough. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > conf.c | 11 +++++++---- > passt.h | 4 ++-- > 2 files changed, 9 insertions(+), 6 deletions(-) >=20 > diff --git a/conf.c b/conf.c > index 0e512f4..3aa3314 100644 > --- a/conf.c > +++ b/conf.c > @@ -903,10 +903,13 @@ static void conf_print(const struct ctx *c) > char buf4[INET_ADDRSTRLEN], ifn[IFNAMSIZ]; > int i; > =20 > - if (c->ifi4) > - info("Outbound interface (IPv4): %s", if_indextoname(c->ifi4, ifn)); > - if (c->ifi6) > - info("Outbound interface (IPv6): %s", if_indextoname(c->ifi6, ifn)); > + info("Template interface: %s%s%s%s%s", > + c->ifi4 ? if_indextoname(c->ifi4, ifn) : "", > + c->ifi4 ? " (IPv4)" : "", > + (c->ifi4 && c->ifi6) ? ", " : "", > + c->ifi6 ? if_indextoname(c->ifi6, ifn) : "", > + c->ifi6 ? " (IPv6)" : ""); > + > if (c->mode =3D=3D MODE_PASTA) > info("Namespace interface: %s", c->pasta_ifn); > =20 > diff --git a/passt.h b/passt.h > index e0383eb..cc60c84 100644 > --- a/passt.h > +++ b/passt.h > @@ -164,10 +164,10 @@ struct ip6_ctx { > * @fd_tap: AF_UNIX socket, tuntap device, or pre-opened socket > * @mac: Host MAC address > * @mac_guest: MAC address of guest or namespace, seen or configured > - * @ifi4: Index of routable interface for IPv4, 0 if IPv4 disabled > + * @ifi4: Index of template interface for IPv4, 0 if IPv4 disabled > * @ip: IPv4 configuration > * @dns_search: DNS search list > - * @ifi6: Index of routable interface for IPv6, 0 if IPv6 disabled > + * @ifi6: Index of template interface for IPv6, 0 if IPv6 disabled > * @ip6: IPv6 configuration > * @pasta_ifn: Name of namespace interface for pasta > * @pasta_ifn: Index of namespace interface for pasta --=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 --4jKr9Jz5t1K/aHNA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmQI+HQACgkQzQJF27ox 2GeVkA/+IzRInfwal4ABJCc34BUkii1Zq8KZPecKGFutEOZLWJArZCthCl/tLLXd +FXivtiuES+hElOIh+EgICIqgeiaJQSmyiT3nr9Lkl1rk9vCOvz/GPVepCBdxosc cM/2ya79Ry8pU+TBYR4//3ibb15nboeUDNviZ3oJ/eVulg7oi7nD1FVf7uMciu5F 3Ot/tzzTskRaoxVJiAQhsEGmAwUGbRZHlHPPS9qNKhqRZVtWnsY0Dj6mO/2grGgi /YTvAOBXPN7mBHKf2y0NK/68BbWRsuf9asBXKvF1/bUZc6tABYxVjxJg21DeVMFY 0k09jLTvgP8c7n7Huii6VcHNKcrmpimOKxnT8V7T+YrCuHrXDu/Gxt6V+JM+em2s UQX1yvJ140KB11vTAbkOv3xPiCZIvwp08YA1iNta5DDW0f/pBqtz+OZkQAqW0Z9L o4xw2edN0qUeIrKFImh9Cx68ZNtxB0mvQvLF3jb5aTzviMjy/5TsrkjtR5j0Eaoi ZB1VQ2WcNn6eyQgIdvmj67WAAE0j9qItxDt1Iy7sf2xD+0nD+ykrLiPe0xLcA1v2 ltoYn1ZTRtSnXJpRUm/L9+fQc6iPDN+GKi5QRS7s97CWsGKenj5JK38kRR36xDRg /njyg36hU8e7HadsSEtGnTUN+VyW+IUfZOpZQ01OsROmz2O2Tx4= =Y9uq -----END PGP SIGNATURE----- --4jKr9Jz5t1K/aHNA--