isisd: fix merging flex-algo route nodes

As isis_route_verify_merge() builds a new route table, each (src,dst)
new node in the table is created by merging data from the same (src,dst)
pair present in all route tables.  However, as it iterates over those
route nodes and copies SR data into the newly created node, it repeatedly
overwrites the isis_route_info pointer.  This, in turn, pollutes the
isis_route_info structures in all of the other tables with partially
updated SR data.

After a route is deleted, this leaves pointers to freed memory in one
of the route trees.

Fixes: 26b0598f6b ("isisd: fix isis_route_merge_verify logic")
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
This commit is contained in:
Eric Kinzie 2022-04-01 00:47:30 +00:00 committed by Louis Scalbert
parent 80ef2e89ee
commit 224eadd955

View File

@ -889,8 +889,9 @@ static void _isis_route_verify_merge(struct isis_area *area,
ISIS_ROUTE_FLAG_ZEBRA_SYNCED)) {
continue;
}
} else {
mrnode->info = rnode->info;
}
mrnode->info = rnode->info;
}
}