Browse Source

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.
Jan-Philipp Litza 7 years ago
parent
commit
7b4fd7a778
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/gluon-radv-filterd/src/gluon-radv-filterd.c

+ 1 - 1
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) {