Skip to content
Snippets Groups Projects
Commit 0a936e4d authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Matthias Schiffer
Browse files

gluon-batman-adv-core: respondd: add gateway_nexthop field

parent a852056c
No related branches found
No related tags found
No related merge requests found
......@@ -212,11 +212,13 @@ static void add_gateway(struct json_object *obj) {
while (getline(&line, &len, f) >= 0) {
char addr[18];
char nexthop[18];
if (sscanf(line, "=> %17[0-9a-fA-F:]", addr) != 1)
if (sscanf(line, "=> %17[0-9a-fA-F:] ( %*u) %17[0-9a-fA-F:]", addr, nexthop) != 2)
continue;
json_object_object_add(obj, "gateway", json_object_new_string(addr));
json_object_object_add(obj, "gateway_nexthop", json_object_new_string(nexthop));
break;
}
......
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