Skip to content
Snippets Groups Projects
Commit e13a6144 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Andreas Ziegler
Browse files

gluon-status-page-mesh-batman-adv: Save if metrics chose neighbor as own best nexthop


The commit a0800497352e ("gluon-status-page-mesh-batman-adv: Retrieve TQ of
neighbors with non-best direct link") removed the check whether a neighbor
has the BATADV_ATTR_FLAG_BEST set. But consumers may still want to filter
out or mark neighbors which don't have this flag set. To assist with such a
feature, enhance the neighbor object with an extra boolean "best" attribute
which stores whether the BATADV_ATTR_FLAG_BEST was found or not.

Reported-by: default avatarVincent Wiemann <webmaster@codefetch.de>
parent cef21e58
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ static int parse_orig_list_netlink_cb(struct nl_msg *msg, void *arg)
json_object_object_add(neigh, "tq", json_object_new_int(tq * 100 / 255));
json_object_object_add(neigh, "ifname", json_object_new_string(ifname));
json_object_object_add(neigh, "best", json_object_new_boolean(attrs[BATADV_ATTR_FLAG_BEST]));
json_object_object_add(opts->obj, mac1, neigh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment