Skip to content

Commit

Permalink
isisd: fix update link params after circuit is up
Browse files Browse the repository at this point in the history
If the link-params are set when the circuit not yet up, the link-params
are never updated.

isis_link_params_update() is called from isis_circuit_up() but returns
immediately because circuit->state != C_STATE_UP. circuit->state is
updated in isis_csm_state_change after isis_circuit_up().

> struct isis_circuit *isis_csm_state_change(enum isis_circuit_event event,
> 					   struct isis_circuit *circuit,
> 					   void *arg)
> {
> [...]
> 			if (isis_circuit_up(circuit) != ISIS_OK) {
> 				isis_circuit_deconfigure(circuit, area);
> 				break;
> 			}
> 			circuit->state = C_STATE_UP;
> 			isis_event_circuit_state_change(circuit, circuit->area,
> 							1);

Do not return isis_link_params_update() if circuit->state != C_STATE_UP.

Fixes: 0fdd8b2 ("isisd: update link params after circuit is up")
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Aug 27, 2024
1 parent 3150d96 commit 6ce6b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isisd/isis_te.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void isis_link_params_update(struct isis_circuit *circuit,
return;

/* Sanity Check */
if ((ifp == NULL) || (circuit->state != C_STATE_UP))
if (ifp == NULL)
return;

te_debug("ISIS-TE(%s): Update circuit parameters for interface %s",
Expand Down

0 comments on commit 6ce6b7a

Please sign in to comment.