Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isisd: don't crash when isis_sock_init fails #2686

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions isisd/isis_circuit.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ int isis_circuit_up(struct isis_circuit *circuit)
thread_add_timer(master, isis_run_dr_l2, circuit,
2 * circuit->hello_interval[1],
&circuit->u.bc.t_run_dr[1]);
} else {
} else if (circuit->circ_type == CIRCUIT_T_P2P) {
/* initializing the hello send threads
* for a ptp IF
*/
Expand Down Expand Up @@ -682,9 +682,6 @@ int isis_circuit_up(struct isis_circuit *circuit)

void isis_circuit_down(struct isis_circuit *circuit)
{
if (circuit->state != C_STATE_UP)
return;

/* Clear the flags for all the lsps of the circuit. */
isis_circuit_update_all_srmflags(circuit, 0);

Expand Down Expand Up @@ -756,10 +753,12 @@ void isis_circuit_down(struct isis_circuit *circuit)
}

/* send one gratuitous hello to spead up convergence */
if (circuit->is_type & IS_LEVEL_1)
send_hello(circuit, IS_LEVEL_1);
if (circuit->is_type & IS_LEVEL_2)
send_hello(circuit, IS_LEVEL_2);
if (circuit->state == C_STATE_UP) {
if (circuit->is_type & IS_LEVEL_1)
send_hello(circuit, IS_LEVEL_1);
if (circuit->is_type & IS_LEVEL_2)
send_hello(circuit, IS_LEVEL_2);
}

circuit->upadjcount[0] = 0;
circuit->upadjcount[1] = 0;
Expand Down