Skip to content

Commit

Permalink
babel: Clean babel config on babel daemon stop
Browse files Browse the repository at this point in the history
When deactivating babel no router babel and later re-enabling
it router babel the previous configuration is still in place.

Steps to reproduce:
 - Enable babel
 - Configure babel
 - Disable babel with "no router babel"
 - Verify config

Expected correct behavior: No config present

Signed-off-by: Yaroslav Kholod <[email protected]>
  • Loading branch information
Yaroslav Kholod committed Dec 20, 2024
1 parent 30467f8 commit 58188b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions babeld/babeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ void babel_clean_routing_process(void)
flush_all_routes();
babel_interface_close_all();

/* Clean babel config */
diversity_kind = DIVERSITY_NONE;
diversity_factor = BABEL_DEFAULT_DIVERSITY_FACTOR;
resend_delay = BABEL_DEFAULT_RESEND_DELAY;
change_smoothing_half_life(BABEL_DEFAULT_SMOOTHING_HALF_LIFE);

/* cancel events */
event_cancel(&babel_routing_process->t_read);
event_cancel(&babel_routing_process->t_update);
Expand Down

0 comments on commit 58188b5

Please sign in to comment.