From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] netlink: Ignore routes via gateways from another address family
Date: Thu, 03 Dec 2026 00:04:03 +0100 (CET) [thread overview]
Message-ID: <20261203000402.5ceb5db2@elisabeth> (raw)
In-Reply-To: <20261202225147.2903249-1-jmaloy@redhat.com>
On Wed, 2 Dec 2026 17:51:47 -0500
Jon Maloy <jmaloy@redhat.com> wrote:
> With NetworkManager's CLAT implementation, the IPv4 default route has
> an IPv6 gateway, given in a RTA_VIA attribute instead of RTA_GATEWAY:
>
> default via inet6 fe80::1 dev wlp170s0f0 proto static src 192.0.0.5
>
> nl_get_ext_if() picks the interface of that route as template for
> IPv4, but nl_route_get_def() finds no IPv4 gateway, so we disable DHCP
> altogether, and the guest silently ends up without IPv4 connectivity,
> even if the host has it.
>
> We can't pass a gateway of a different address family on to the guest,
> so don't consider such routes in nl_get_ext_if(). If no other IPv4
> routes are available, as in the case above, we fall back to local
> mode, which gives the guest a working IPv4 configuration: traffic
> still reaches the host via our sockets, and the host translates it.
> The address we would otherwise copy, from 192.0.0.0/29 (RFC 7335), is
> just a placeholder in CLAT setups anyway.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=231
> Suggested-by: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Thanks for the patch, could you perhaps resend as it is with the correct
Reported-by: tag and Cc'ing the reporter?
By the way, at a quick glance, it might be nice to implement a fallback
for kernel version headers without 'rtvia_family' (before 4.1), but I'm
not sure how involved that is. On the other hand 4.1 is pretty old so
I don't think it's strictly necessary.
--
Stefano
prev parent reply other threads:[~2026-12-02 23:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 22:51 Jon Maloy
2026-12-02 23:04 ` Stefano Brivio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203000402.5ceb5db2@elisabeth \
--to=sbrivio@redhat.com \
--cc=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).