When running `show run` of route-maps the order is basically
the order read in some fashion. Convert the display to
always be the alphabetically sorted order.
Suggested-by: Manuel Schweizer <manuel@cloudscale.ch>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
struct route_map_rule *rule;
int first = 1;
int write = 0;
+ struct listnode *ln;
+ struct list *maplist = list_new();
for (map = route_map_master.head; map; map = map->next)
+ listnode_add(maplist, map);
+
+ list_sort(maplist, sort_route_map);
+
+ for (ALL_LIST_ELEMENTS_RO(maplist, ln, map))
for (index = map->head; index; index = index->next) {
if (!first)
vty_out(vty, "!\n");
write++;
}
+
+ list_delete(&maplist);
return write;
}