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 086B25A027F for ; Mon, 22 May 2023 11:59:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684749553; 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=9nhMK0rcAzI/rXqIyVxam6bp6QKgq63uhth0EuxgQNo=; b=DF61vZ1TXyx4kYVB92CPDSp/Pnphs3kHqmPNntU4s5fRAcNzBmzaJpxV03rt6wfys6hU8M G5LCNmLrCIzilgrRKA628u5DuCfNq+xP4u5o0afhZZTkzCzKiBR96B/cTQUSDuwkRqRyiz n9EZ+2F9LkIZIdmS72zMg3yVC+iO+qI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-502-5VctKrNMPyWhLGRvjW5fWA-1; Mon, 22 May 2023 05:59:09 -0400 X-MC-Unique: 5VctKrNMPyWhLGRvjW5fWA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2471D1C060CB; Mon, 22 May 2023 09:59:09 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B58A5C584E0; Mon, 22 May 2023 09:59:07 +0000 (UTC) Date: Mon, 22 May 2023 11:59:05 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 05/10] conf, pasta: With --config-net, copy all routes by default Message-ID: <20230522115905.76a78a71@elisabeth> In-Reply-To: References: <20230521234224.2770015-1-sbrivio@redhat.com> <20230521234224.2770015-6-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: EDJB4IFK4V5ROJBGKD4QVOA2N5WAICMP X-Message-ID-Hash: EDJB4IFK4V5ROJBGKD4QVOA2N5WAICMP 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, Callum Parsey , me@yawnt.com, lemmi@nerd2nerd.org, Andrea Arcangeli 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 Mon, 22 May 2023 18:44:51 +1000 David Gibson wrote: > On Mon, May 22, 2023 at 01:42:19AM +0200, Stefano Brivio wrote: > > Use the newly-introduced NL_DUP mode for nl_route() to copy all the > > routes associated to the template interface in the outer namespace, > > unless --no-copy-routes (also implied by -g) is given. > > > > Otherwise, we can't use default gateways which are not, address-wise, > > on the same subnet as the container, as reported by Callum. > > > > Reported-by: Callum Parsey > > Link: https://github.com/containers/podman/issues/18539 > > Signed-off-by: Stefano Brivio > > Reviewed-by: David Gibson > > The logic looks sound, although I do have one concern noted below. > > > --- > > conf.c | 14 ++++++++++++++ > > passt.1 | 10 ++++++++++ > > passt.h | 4 +++- > > pasta.c | 6 ++++-- > > 4 files changed, 31 insertions(+), 3 deletions(-) > > > > diff --git a/conf.c b/conf.c > > index 3ee6ae0..7541261 100644 > > --- a/conf.c > > +++ b/conf.c > > @@ -923,6 +923,7 @@ pasta_opts: > > info( " --no-netns-quit Don't quit if filesystem-bound target"); > > info( " network namespace is deleted"); > > info( " --config-net Configure tap interface in namespace"); > > + info( " --no-copy-routes Don't copy all routes to namespace"); > > I'm always a bit nervous about adding new options, since it's > something we then have to maintain compatibility for. Do we have a > confirmed use case where the copy routes behaviour will cause trouble? Not really, but I wanted to keep around the possibility of having the old behaviour, in case one wants to skip stuff like source routing or fallback routes with different metrics. Compatibility-wise it doesn't look like a huge burden (besides, I think these options could even be dropped at some point). Same as you noticed for 9/10: this could be obtained by passing one or two -g options, but it's not as "immediate" as "just give me one working default gateway". -- Stefano