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

disable holdoff for reconnect on timeout or link failure #538

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
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
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
3 changes: 2 additions & 1 deletion pppd/pppd.8
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ exclude the password string from the log. This is the default.
Specifies how many seconds to wait before re-initiating the link after
it terminates. This option only has any effect if the \fIpersist\fR
or \fIdemand\fR option is used. The holdoff period is not applied if
the link was terminated because it was idle.
the link was terminated because it was idle, connect time expired,
modem hangup or user request.
.TP
.B idle \fIn
Specifies that pppd should disconnect if the link is idle for \fIn\fR
Expand Down
Loading