mirror of
https://github.com/LiBwrt-op/ipq50xx.git
synced 2025-12-16 15:01:44 +00:00
ChangeLog: https://github.com/ppp-project/ppp/blob/ppp-2.5.1/ChangeLog Suppressed patches: 010-use_target_for_configure.patch [1] 510-pptp_compile_fix.patch [2] 520-u_int_bsd_fix.patch [3] Upstreamed patches: 330-retain_foreign_default_routes.patch [4] 521-remove_unused_openssl_dep.patch [5] [1]e48a9b5de4[2] Merged into "500-add-pptp-plugin.patch" [3]797cdae57c[4]9856f47063[5]59342ab622Signed-off-by: Shiji Yang <yangshiji66@qq.com> Link: https://github.com/openwrt/openwrt/pull/16605 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
25 lines
764 B
Diff
25 lines
764 B
Diff
pppd: Do not clobber exit codes on hangup
|
|
|
|
When a modem hangup occurs, pppd unconditionally sets the exit status code
|
|
to EXIT_HANGUP. This patch only sets EXIT_HANGUP if the exit status code is
|
|
not already set to an error value.
|
|
|
|
The motiviation of this patch is to allow applications which remote control
|
|
pppd to react properly on errors, e.g. only redial (relaunch pppd) if there
|
|
was a hangup, but not if the CHAP authentication failed.
|
|
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
|
|
--- a/pppd/main.c
|
|
+++ b/pppd/main.c
|
|
@@ -1152,7 +1152,8 @@ get_input(void)
|
|
}
|
|
notice("Modem hangup");
|
|
hungup = 1;
|
|
- code = EXIT_HANGUP;
|
|
+ if (code == EXIT_OK)
|
|
+ code = EXIT_HANGUP;
|
|
lcp_lowerdown(0); /* serial link is no longer available */
|
|
link_terminated(0);
|
|
return;
|