public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/3] wired: Update to the new l_netlink_send API
@ 2024-07-26 22:37 Denis Kenzior
  2024-07-26 22:37 ` [PATCH 2/3] netdev: " Denis Kenzior
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Denis Kenzior @ 2024-07-26 22:37 UTC (permalink / raw)
  To: iwd; +Cc: Denis Kenzior

---
 wired/ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/wired/ethdev.c b/wired/ethdev.c
index e5353582494e..a933cc18e343 100644
--- a/wired/ethdev.c
+++ b/wired/ethdev.c
@@ -723,7 +723,8 @@ static void setup_adapter_interface(struct l_dbus_interface *interface)
 
 bool ethdev_init(const char *whitelist, const char *blacklist)
 {
-	struct ifinfomsg msg;
+	struct ifinfomsg ifi;
+	struct l_netlink_message *nlm;
 
 	if (rtnl)
 		return false;
@@ -760,10 +761,11 @@ bool ethdev_init(const char *whitelist, const char *blacklist)
 	if (blacklist)
 		blacklist_filter = l_strsplit(blacklist, ',');
 
-	memset(&msg, 0, sizeof(msg));
+	memset(&ifi, 0, sizeof(ifi));
+	nlm = l_netlink_message_new_sized(RTM_GETLINK, NLM_F_DUMP, sizeof(ifi));
+	l_netlink_message_add_header(nlm, &ifi, sizeof(ifi));
 
-	l_netlink_send(rtnl, RTM_GETLINK, NLM_F_DUMP, &msg, sizeof(msg),
-						getlink_callback, NULL, NULL);
+	l_netlink_send(rtnl, nlm, getlink_callback, NULL, NULL);
 
 	return true;
 }
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-30 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 22:37 [PATCH 1/3] wired: Update to the new l_netlink_send API Denis Kenzior
2024-07-26 22:37 ` [PATCH 2/3] netdev: " Denis Kenzior
2024-07-26 22:37 ` [PATCH 3/3] monitor: Update to the new ell " Denis Kenzior
2024-07-29 11:41 ` [PATCH 1/3] wired: Update to the new " James Prestwood
2024-07-30 15:53 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox