Skip to content

Commit

Permalink
disable holdoff for reconnect on timeout or link failure
Browse files Browse the repository at this point in the history
  • Loading branch information
anphsw committed Dec 12, 2024
1 parent 734bc04 commit 12b7225
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pppd/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,7 @@ connect_time_expired(void *arg)
info("Connect time expired");
ppp_set_status(EXIT_CONNECT_TIME);
lcp_close(0, "Connect time expired"); /* Close connection */
need_holdoff = 0;
}

/*
Expand Down
5 changes: 4 additions & 1 deletion pppd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,10 @@ main(int argc, char *argv[])
while (phase != PHASE_DEAD) {
handle_events();
get_input();
if (kill_link)
if (kill_link) {
lcp_close(0, "User request");
need_holdoff = 0;
}
if (asked_to_quit) {
bundle_terminating = 1;
if (phase == PHASE_MASTER)
Expand Down Expand Up @@ -1153,6 +1155,7 @@ get_input(void)
notice("Modem hangup");
hungup = 1;
code = EXIT_HANGUP;
need_holdoff = 0;
lcp_lowerdown(0); /* serial link is no longer available */
link_terminated(0);
return;
Expand Down

0 comments on commit 12b7225

Please sign in to comment.