The route_info[X].meta_q_map *must* be less than MQ_SIZE
or we will do some strange stuff, so assert on it at startup.
The distance in route_info is a uint8_t so let's keep the data
structure the same.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
/* Each route type's string and default distance value. */
static const struct {
int key;
- int distance;
+ uint8_t distance;
uint8_t meta_q_map;
} route_info[ZEBRA_ROUTE_MAX] = {
[ZEBRA_ROUTE_SYSTEM] = {ZEBRA_ROUTE_SYSTEM, 0, 4},
if (i == ZEBRA_ROUTE_SYSTEM || i == ZEBRA_ROUTE_ALL)
continue;
assert(route_info[i].key);
+ assert(route_info[i].meta_q_map < MQ_SIZE);
}
}