diff options
| author | Don Slice <dslice@cumulusnetworks.com> | 2018-04-19 21:04:05 +0000 |
|---|---|---|
| committer | Don Slice <dslice@cumulusnetworks.com> | 2018-04-19 14:07:20 -0700 |
| commit | 3660beec291a9d1e5a9b4b24a95b6d48d455a002 (patch) | |
| tree | 70fdcf4a0f5911dbb10911263933d9e9b639b7bf /zebra/redistribute.c | |
| parent | 2f77318e19bb92867d4f8a7c3a46c8ed3ad949ad (diff) | |
zebra: resolve issue when changing import-table route-map config
When changing from "ip import-table 10 route-map rdn" to "ip
import-table 10" without a route-map, routes would be deleted
and not reinstalled. This fix resolves that problem.
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'zebra/redistribute.c')
| -rw-r--r-- | zebra/redistribute.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 2e19d6fb75..a51cd6ecc9 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -616,8 +616,10 @@ int zebra_import_table(afi_t afi, uint32_t table_id, uint32_t distance, else { rmap_name = zebra_get_import_table_route_map(afi, table_id); - if (rmap_name) + if (rmap_name) { zebra_del_import_table_route_map(afi, table_id); + rmap_name = NULL; + } } zebra_import_table_used[afi][table_id] = 1; @@ -628,8 +630,10 @@ int zebra_import_table(afi_t afi, uint32_t table_id, uint32_t distance, ZEBRA_TABLE_DISTANCE_DEFAULT; rmap_name = zebra_get_import_table_route_map(afi, table_id); - if (rmap_name) + if (rmap_name) { zebra_del_import_table_route_map(afi, table_id); + rmap_name = NULL; + } } for (rn = route_top(table); rn; rn = route_next(rn)) { |
