Embedded Linux Library
 help / color / mirror / Atom feed
From: Ryan Walklin <ryan@testtoast.com>
To: ell@lists.linux.dev
Cc: Ryan Walklin <ryan@testtoast.com>
Subject: [PATCH 1/6] netconfig: Allocate the expired lists
Date: Tue, 17 Nov 2026 11:27:47 +1300	[thread overview]
Message-ID: <20261116222756.2921577-2-ryan@testtoast.com> (raw)
In-Reply-To: <20261116222756.2921577-1-ryan@testtoast.com>

addresses.expired and routes.expired have never been allocated, so
pushing to them silently does nothing.  Expired addresses and routes are
leaked and users never see them on the lists returned by
l_netconfig_get_addresses() and l_netconfig_get_routes().  An IPv6 route
that expires also never causes netconfig_signal_expired() to emit an
update.

Fixes: 18c4434324c2 ("netconfig: Expire addresses and routes")
---
 ell/netconfig.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ell/netconfig.c b/ell/netconfig.c
index 9cebdc3..2444d97 100644
--- a/ell/netconfig.c
+++ b/ell/netconfig.c
@@ -1353,10 +1353,12 @@ LIB_EXPORT struct l_netconfig *l_netconfig_new(uint32_t ifindex)
 	nc->addresses.added = l_queue_new();
 	nc->addresses.updated = l_queue_new();
 	nc->addresses.removed = l_queue_new();
+	nc->addresses.expired = l_queue_new();
 	nc->routes.current = l_queue_new();
 	nc->routes.added = l_queue_new();
 	nc->routes.updated = l_queue_new();
 	nc->routes.removed = l_queue_new();
+	nc->routes.expired = l_queue_new();
 	nc->icmp_route_data = l_queue_new();
 
 	nc->dhcp_client = l_dhcp_client_new(ifindex);
@@ -1405,10 +1407,12 @@ LIB_EXPORT void l_netconfig_destroy(struct l_netconfig *netconfig)
 	l_queue_destroy(netconfig->addresses.added, NULL);
 	l_queue_destroy(netconfig->addresses.updated, NULL);
 	l_queue_destroy(netconfig->addresses.removed, NULL);
+	l_queue_destroy(netconfig->addresses.expired, NULL);
 	l_queue_destroy(netconfig->routes.current, NULL);
 	l_queue_destroy(netconfig->routes.added, NULL);
 	l_queue_destroy(netconfig->routes.updated, NULL);
 	l_queue_destroy(netconfig->routes.removed, NULL);
+	l_queue_destroy(netconfig->routes.expired, NULL);
 	l_queue_destroy(netconfig->icmp_route_data, NULL);
 	l_queue_destroy(netconfig->slaac_domains, NULL);
 	l_queue_destroy(netconfig->slaac_dnses, NULL);
-- 
2.55.0


  reply	other threads:[~2026-11-16 22:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 22:27 [PATCH 0/6] netconfig: RA route, SLAAC lifetime and DNS fixes Ryan Walklin
2026-11-16 22:27 ` Ryan Walklin [this message]
2026-11-16 22:27 ` [PATCH 2/6] netconfig: Fix leak of RA route data Ryan Walklin
2026-11-16 22:27 ` [PATCH 3/6] netconfig: Expire RA routes never refreshed Ryan Walklin
2026-11-16 22:27 ` [PATCH 4/6] netconfig: Fix the RFC 4862 2-hour rule Ryan Walklin
2026-11-16 22:27 ` [PATCH 5/6] netconfig: Skip duplicate DNS servers and domains Ryan Walklin
2026-11-16 22:27 ` [PATCH 6/6] icmp6: Fix RA leak when stopped from a handler Ryan Walklin

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=20261116222756.2921577-2-ryan@testtoast.com \
    --to=ryan@testtoast.com \
    --cc=ell@lists.linux.dev \
    /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