From: "Yoann Congal" <yoann.congal@smile.fr>
To: <UpStream_IP-AH@bmwtechworks.in>,
<openembedded-core@lists.openembedded.org>
Cc: "Akash Hadke" <Akash.Hadke@bmwtechworks.in>
Subject: Re: [OE-core] [scarthgap][PATCHv2] systemd: backport networkd route readiness fix from upstream
Date: Fri, 16 Oct 2026 00:28:32 +0200 [thread overview]
Message-ID: <DM5RLSG71QPZ.P6T1LH6RPAI9@smile.fr> (raw)
In-Reply-To: <20261009102805.83893-1-UpStream_IP-AH@bmwtechworks.in>
Hello,
On Fri Oct 9, 2026 at 12:28 PM CEST, Akash Hadke via lists.openembedded.org wrote:
> From: Akash Hadke <Akash.Hadke@bmwtechworks.in>
>
> Backport upstream systemd PR #41000 to v255.22 to fix route handling
> in systemd-networkd when routes are configured on links that are not
> yet up.
>
> In 255.21, networkd only checks link readiness when configuring
> explicit nexthops. Routes using an implicit nexthop can therefore
> be processed while the bound link is still down, which breaks setups
> using ConfigureWithoutCarrier= and BindCarrier=. One visible symptom
> is that static multicast routes are not installed until much later,
> or are missed entirely, even though the address configuration succeeds.
>
> The upstream fix makes the readiness checks consistent by introducing
> a common link_is_up() helper, limiting gateway readiness checks to
> nexthops that are actually bound to a link, and moving the
> "link must be up" check into the shared gateway readiness path so both
> explicit and implicit nexthops follow the same logic. Upstream also
> adds a regression test for issue #40106.
>
> This backport is needed to keep route configuration reliable on
> carrier-dependent interfaces in our 255.22-based systemd.
>
> Ref: https://github.com/systemd/systemd/pull/41000
> https://github.com/systemd/systemd/issues/40106
>
> Tested:
> - Built core-image-minimal with INIT_MANAGER = "systemd" on qemux86-64.
> - Verified functional test case in QEMU:
> * Setup dummy parent (carrier off) and VLAN child with BindCarrier=.
> * Verified multicast route remains deferred while carrier is down.
> * Verified multicast route installs immediately upon carrier up.
> * Verified clean route recovery across carrier toggles.
>
> Signed-off-by: Akash Hadke <UpStream_IP-AH@bmwtechworks.in>
> Signed-off-by: Akash Hadke <Akash.Hadke@bmwtechworks.in>
> ---
> ...introduce-link_is_up-helper-function.patch | 167 ++++++++++++++++++
> ...-gateway-is-ready-only-when-the-next.patch | 74 ++++++++
> ...und-to-a-link-requires-the-link-is-u.patch | 59 +++++++
> ...etwork-add-test-case-for-issue-40106.patch | 120 +++++++++++++
> meta/recipes-core/systemd/systemd_255.22.bb | 4 +
> 5 files changed, 424 insertions(+)
> create mode 100644 meta/recipes-core/systemd/systemd/0023-network-introduce-link_is_up-helper-function.patch
> create mode 100644 meta/recipes-core/systemd/systemd/0024-network-check-if-gateway-is-ready-only-when-the-next.patch
> create mode 100644 meta/recipes-core/systemd/systemd/0025-network-route-bound-to-a-link-requires-the-link-is-u.patch
> create mode 100644 meta/recipes-core/systemd/systemd/0026-test-network-add-test-case-for-issue-40106.patch
>
> diff --git a/meta/recipes-core/systemd/systemd/0023-network-introduce-link_is_up-helper-function.patch b/meta/recipes-core/systemd/systemd/0023-network-introduce-link_is_up-helper-function.patch
> new file mode 100644
> index 0000000000..45f2733b50
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0023-network-introduce-link_is_up-helper-function.patch
> @@ -0,0 +1,167 @@
> +From ec4f646759d6625bbafcd4ce67224fb63b99a96c Mon Sep 17 00:00:00 2001
> +From: Yu Watanabe <watanabe.yu+github@gmail.com>
> +Date: Mon, 9 Mar 2026 10:57:06 +0900
> +Subject: [PATCH] network: introduce link_is_up() helper function
> +
> +Upstream-Status: Backport [https://github.com/systemd/systemd/pull/41000/commits/ec4f646759d6625bbafcd4ce67224fb63b99a96c]
> +Comment: Patch is refreshed based on the 255.22 codebase
> +Did not pick changes from the below files as it is not matches to our code base.
> +src/network/netdev/bond.c
> +src/network/networkd-route.c
> +
> +Signed-off-by: Akash Hadke <Akash.Hadke@bmwtechworks.in>
> +---
> + src/network/networkd-link.c | 21 +++++++++++----------
> + src/network/networkd-link.h | 1 +
> + src/network/networkd-nexthop.c | 2 +-
> + src/network/networkd-setlink.c | 9 ++++-----
> + 4 files changed, 17 insertions(+), 16 deletions(-)
After some thoughts, this patch looks too intrusive "just" to add the
link_is_up() function that is just a flag check.
I know I usually ask to use upstream as much as possible but here, I
think it make sense to port the relevant code without the link_is_up()
function addition (and keep the inlined flag check).
Note: it matters less now but I prefer plain /commit/ URLs instead of the
one from the pull request:
https://github.com/systemd/systemd/commit/ec4f646759d6625bbafcd4ce67224fb63b99a96c
Thanks!
--
Yoann Congal
Smile ECS
prev parent reply other threads:[~2026-10-15 22:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 10:28 [scarthgap][PATCHv2] systemd: backport networkd route readiness fix from upstream Akash Hadke
2026-10-15 22:28 ` Yoann Congal [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=DM5RLSG71QPZ.P6T1LH6RPAI9@smile.fr \
--to=yoann.congal@smile.fr \
--cc=Akash.Hadke@bmwtechworks.in \
--cc=UpStream_IP-AH@bmwtechworks.in \
--cc=openembedded-core@lists.openembedded.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox