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.
This commit is contained in:
Jan-Philipp Litza 2017-03-06 21:47:03 +01:00
parent a1fea711da
commit 5f3f371ee8
No known key found for this signature in database
GPG Key ID: 1FB658053CE27196

View File

@ -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) {