]> git.proxmox.com Git - mirror_frr.git/commit
ripd: simplify cleaning up of routing instance
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 4 Jan 2019 21:08:10 +0000 (19:08 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 18 Jan 2019 18:15:41 +0000 (16:15 -0200)
commit2d2eaa136601068130b028b274316edc19ade5c6
treee02598f5d6f26871392a77383111ed7695a5e2bf
parent2ae9e38fa7d1a29ba39875b28f0135335c0e2329
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>
ripd/rip_main.c
ripd/rip_zebra.c
ripd/ripd.c