From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>, Martin Schitter <ms+git@mur.at>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2] netlink: Copy all routes in nl_route_dup(), not just the first batch
Date: Mon, 30 Nov 2026 01:34:53 +0100 (CET) [thread overview]
Message-ID: <20261130013452.18bd5e83@elisabeth> (raw)
In-Reply-To: <20261127143104.589149-1-jmaloy@redhat.com>
On Fri, 27 Nov 2026 09:31:04 -0500
Jon Maloy <jmaloy@redhat.com> wrote:
> From: Martin Schitter <ms+git@mur.at>
>
> The kernel splits large route dumps over several netlink datagrams, but
> nl_route_dup() currently only processes the first one, and fails with
> "Too many routes to duplicate" if there are more. This happens when
> there are more than about 50 routes on the template interface.
>
> Change the code so that all datagrams are processed. Routes are copied
> to the destination namespace in three successive steps, to satisfy
> dependencies between them:
> - routes to local addresses
> - routes to local networks
> - routes with a gateway
>
> This approach is inspired by the restore subcommand of iproute2.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=221
> Signed-off-by: Martin Schitter <ms+git@mur.at>
> [jmaloy: Keep stripping of RTA_PREFSRC and RTA_NH_ID, bounds check on
> attribute types, style fixes]
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Applied, thanks both, and, Martin, welcome to the git log!
I'll close https://bugs.passt.top/show_bug.cgi?id=221 as well as the
Debian bug at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146729
once this is in a release / package.
--
Stefano
next prev parent reply other threads:[~2026-11-30 0:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 11:46 [PATCH] netlink: Fix nl_route_dup by 3-step processing Martin Schitter
2026-11-11 1:47 ` Stefano Brivio
2026-11-27 14:31 ` [PATCH v2] netlink: Copy all routes in nl_route_dup(), not just the first batch Jon Maloy
2026-11-27 15:26 ` Stefano Brivio
2026-11-27 16:26 ` Martin Schitter
2026-11-27 16:05 ` Martin Schitter
2026-11-30 0:34 ` Stefano Brivio [this message]
2026-11-26 21:52 Jon Maloy
2026-11-26 23:57 ` Stefano Brivio
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=20261130013452.18bd5e83@elisabeth \
--to=sbrivio@redhat.com \
--cc=jmaloy@redhat.com \
--cc=ms+git@mur.at \
--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).