summaryrefslogtreecommitdiff
path: root/ripd/rip_zebra.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 19:08:10 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 16:15:41 -0200
commit2d2eaa136601068130b028b274316edc19ade5c6 (patch)
treee02598f5d6f26871392a77383111ed7695a5e2bf /ripd/rip_zebra.c
parent2ae9e38fa7d1a29ba39875b28f0135335c0e2329 (diff)
ripd: simplify cleaning up of routing instance
* Call rip_clean() only when RIP is configured, this way we can remove one indentation level from this function. * rip_redistribute_clean() is only called on shutdown, so there's no need to call rip_redistribute_withdraw() there since the RIP table is already cleaned up elsewhere. * There's no need to clean up the "rip->neighbor" nodes manually before calling route_table_finish(). * Deallocate the rip structure only at the end of the function. This prepares the ground for the next commits where all global variables will be moved to the rip structure. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/rip_zebra.c')
-rw-r--r--ripd/rip_zebra.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index fff8681775..684614fb47 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -180,9 +180,6 @@ void rip_redistribute_clean(void)
VRF_DEFAULT);
vrf_bitmap_unset(zclient->redist[AFI_IP][i], VRF_DEFAULT);
-
- /* Remove the routes from RIP table. */
- rip_redistribute_withdraw(i);
}
}