From 5f3f371ee8586989d6f747ac25c59ec1f848665b Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Mon, 6 Mar 2017 21:47:03 +0100 Subject: [PATCH] gluon-radv-filterd: Fix and simplify originators parsing Previously, only one nexthop was recognized. The parsing of the whole file failed immediately when two or more hops were possible for *any* originator (not only for one with a router behind it). This makes the parser ignore most of the line in the originators table. --- package/gluon-radv-filterd/src/gluon-radv-filterd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-radv-filterd/src/gluon-radv-filterd.c b/package/gluon-radv-filterd/src/gluon-radv-filterd.c index eeef8328..27bdd338 100644 --- a/package/gluon-radv-filterd/src/gluon-radv-filterd.c +++ b/package/gluon-radv-filterd/src/gluon-radv-filterd.c @@ -379,7 +379,7 @@ static void update_tqs() { // skip header while (fgetc(f) != '\n'); while (fgetc(f) != '\n'); - while (fscanf(f, F_MAC " %*fs (%hhu) " F_MAC_IGN " [ %*[^]]]: " F_MAC_IGN " (%*3u)\n", + while (fscanf(f, F_MAC " %*fs (%hhu) %*[^\n]\n", F_MAC_VAR(&mac_a), &tq) == 7) { foreach(router, G.routers) {