diff options
author | hasso <hasso> | 2005-08-05 07:40:15 +0000 |
---|---|---|
committer | hasso <hasso> | 2005-08-05 07:40:15 +0000 |
commit | a39740b341f49ac0fd9e8d64788b5cf29af415c9 (patch) | |
tree | 8f8eee03187b1ad4491a53aa68414e9841662d4e /ospfd/ospf_zebra.c | |
parent | 4f5b4ed29c0044e12f4764b5fd2dfb6acb1d0a68 (diff) | |
download | quagga-a39740b341f49ac0fd9e8d64788b5cf29af415c9.tar.bz2 quagga-a39740b341f49ac0fd9e8d64788b5cf29af415c9.tar.xz |
* ospf_zebra.c: Don't assert/stop before type == ZEBRA_ROUTE_MAX if
dealing with routemaps. There is ospf->route_map[ZEBRA_ROUTE_MAX]
for default-information.
Fixes bugzilla #208.
[backport candidate]
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r-- | ospfd/ospf_zebra.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 9db89810..0e1905a0 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -927,7 +927,7 @@ ospf_distribute_list_update_timer (struct thread *thread) struct ospf *ospf; type = (intptr_t)THREAD_ARG (thread); - assert (type < ZEBRA_ROUTE_MAX); + assert (type <= ZEBRA_ROUTE_MAX); rt = EXTERNAL_INFO (type); @@ -992,7 +992,7 @@ ospf_filter_update (struct access_list *access) return; /* Update distribute-list, and apply filter. */ - for (type = 0; type < ZEBRA_ROUTE_MAX; type++) + for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { if (ROUTEMAP (ospf, type) != NULL) { @@ -1001,6 +1001,10 @@ ospf_filter_update (struct access_list *access) continue; } + /* There is place for route-map for default-information (ZEBRA_ROUTE_MAX), + * but no distribute list. */ + if (type == ZEBRA_ROUTE_MAX) + break; if (DISTRIBUTE_NAME (ospf, type)) { @@ -1061,7 +1065,7 @@ ospf_prefix_list_update (struct prefix_list *plist) /* Update all route-maps which are used as redistribution filters. * They might use prefix-list. */ - for (type = 0; type < ZEBRA_ROUTE_MAX; type++) + for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { if (ROUTEMAP (ospf, type) != NULL) { |