public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Jon Maloy <jmaloy@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] netlink: Ignore routes via gateways from another address family
Date: Thu, 3 Dec 2026 10:11:15 -0500	[thread overview]
Message-ID: <95ec1e40-1c1b-4f18-97cd-7236d01ffa0a@redhat.com> (raw)
In-Reply-To: <20261203000402.5ceb5db2@elisabeth>



On 2026-12-02 18:04, Stefano Brivio wrote:
> 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.
> 
Reposted as v2.
Regarding the kernel headers, Linux 4.1 is from 2015, so I think the 
risk is extremely low. I feel we can afford to wait until there is
an actual bug report on this.

///jon

      reply	other threads:[~2026-12-03 15:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 22:51 Jon Maloy
2026-12-02 23:04 ` Stefano Brivio
2026-12-03 15:11   ` Jon Maloy [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=95ec1e40-1c1b-4f18-97cd-7236d01ffa0a@redhat.com \
    --to=jmaloy@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).