]> git.proxmox.com Git - mirror_frr.git/commit - ospf6d/ospf6_nssa.c
ospf6d: assorted code cleanup
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 6 Oct 2021 00:25:55 +0000 (21:25 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 6 Oct 2021 00:25:55 +0000 (21:25 -0300)
commit8ee9d58b0d67fc918259ef69f106586bd0a3a6da
tree21fe8d6e32034d9e204289598927442ff1bf62a6
parent7270e0edf3b040cc9a7a430f2a1581923e27cd44
ospf6d: assorted code cleanup

This commits consists of several changes that positively impact
code reability without introducing any logical change.

Summary of the changes:
* Return earlier in ospf6_abr_range_update() in order to reduce one
  level of indentation;
* Remove ospf6_translated_nssa_originate() since it's nothing other
  than a useless wrapper around ospf6_lsa_translated_nssa_new();
* Change ospf6_abr_translate_nssa() to return void;
* Change ospf6_abr_process_nssa_translates() checking for NSSA areas
  before anything else;
* Remove ospf6_abr_remove_unapproved_translates_apply() since it's a
  small function that is only called in one place;
* Change ospf6_abr_check_translate_nssa() to avoid an LSDB lookup when
  the router isn't an ABR.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ospf6d/ospf6_abr.c
ospf6d/ospf6_nssa.c
ospf6d/ospf6_nssa.h