From: Stefano Brivio <sbrivio@redhat.com>
To: Benjamin Schubert <contact@benschubert.me>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] netlink: Fix gateway selection for multipath default routes
Date: Thu, 03 Dec 2026 01:23:52 +0100 (CET) [thread overview]
Message-ID: <20261203012351.191a47d9@elisabeth> (raw)
In-Reply-To: <QIr6uPC0-xe6v19HEpGrvgm6LtBk80iLbC3tg_oDczvPfKn2vONGGmYapurX-fEeS-MHBlTBjlkIs3NM6EZp5qWUHwKXSWpVgD_zWv6oJqs=@benschubert.me>
On Tue, 01 Dec 2026 14:07:58 +0000
Benjamin Schubert <contact@benschubert.me> wrote:
> From: Benjamin Schubert <bschubert15@bloomberg.net>
>
> The documentation of `--gateway` in `passt.1` states that
> for a multipath default route, the first nexthop router returned
> by the kernel with the highest weight is selected.
>
> `nl_route_get_def_multipath()` however allowed a subsequent route with
> the same weight to override the nexthop, so it was the last gateway
> with a nexthop that would actually be chosen.
>
> This aligns the code with the documentation, by fixing the code to
> only select a new gateway if it has strictly a higher weight.
>
> Also update the selected weight only after finding a gateway.
> Since a device-only enxthop is not a gateway cnadidate, it must
> not prevent a subsequent gateway from being selected.
>
> Add 7 tests for various ipv4 and ipv6 scenarios with multipath
> gateways. Note that ipv6 with no default gateway is not accepted by
> the kernel, and thus ipv6 has one less test.
> All 7 tests fail before this change.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=230
> Signed-off-by: Benjamin Schubert <bschubert15@bloomberg.net>
Applied, thanks, and welcome to the git log!
Contrary to what I assumed in my latest comment on the ticket, there
was no substantial edit of the commit message needed, except for a
couple of minor typos (enxthop, cnadidate), which I fixed on merge.
--
Stefano
prev parent reply other threads:[~2026-12-03 0:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:07 Benjamin Schubert
2026-12-03 0:23 ` 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=20261203012351.191a47d9@elisabeth \
--to=sbrivio@redhat.com \
--cc=contact@benschubert.me \
--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).