info_callback expects the BATADV_ATTR_MESH_ADDRESS attribute to be set. But
it never checked if it is not NULL.

Fixes: d8dd1ff1a0fe ("batctl: Use netlink to replace some of debugfs")
Signed-off-by: Sven Eckelmann <[email protected]>
---
 netlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/netlink.c b/netlink.c
index 5f78602..be92a9c 100644
--- a/netlink.c
+++ b/netlink.c
@@ -325,6 +325,7 @@ int netlink_stop_callback(struct nl_msg *msg, void *arg 
__maybe_unused)
 static const int info_mandatory[] = {
        BATADV_ATTR_MESH_IFINDEX,
        BATADV_ATTR_MESH_IFNAME,
+       BATADV_ATTR_MESH_ADDRESS,
 };
 
 static const int info_hard_mandatory[] = {

-- 
2.47.3

Reply via email to