Currently, when changing ABR type on a working router, SPF recalculation
will only be initiated if the OSPF flags have changed after this.
Otherwise, SPF recalculation will be omitted and OSPF RIB update will
not occur. In other words, changing ABR type might not result in
inter-area routes addition/deletion.
With this fix, when ABR type is changed, the command handler initiates
SPF recalculation.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
if (ospf->abr_type != abr_type) {
ospf->abr_type = abr_type;
ospf_schedule_abr_task(ospf);
+
+ /* The ABR task might not initiate SPF recalculation if the
+ * OSPF flags remain the same. And inter-area routes would not
+ * be added/deleted according to the new ABR type. So this
+ * needs to be done here too.
+ */
+ ospf_spf_calculate_schedule(ospf, SPF_FLAG_ABR_STATUS_CHANGE);
}
return CMD_SUCCESS;