summaryrefslogtreecommitdiff
path: root/pppd/auth.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-03-11 19:30:21 +1100
committerPaul Mackerras <paulus@samba.org>2013-03-11 19:30:21 +1100
commit225361d64ae737afdc8cb57579a2f33525461bc9 (patch)
treeae397374588c8c3f3450cc417be0dd7d8ec8057f /pppd/auth.c
parent398ed2585640d198c53e736ee5bbd67f7ce8168e (diff)
downloadppp-225361d64ae737afdc8cb57579a2f33525461bc9.tar.gz
pppd: Default exit status to EXIT_CONNECT_FAILED during connection phase
The rp-pppoe plugin doesn't set the exit status in its connect function, resulting in pppd exiting with a status of EXIT_OK (0) if rp-pppoe fails to connect. This fixes the problem for rp-pppoe and any other plugins that don't set the exit status explicitly by making the status default to EXIT_CONNECT_FAILED if the channel's connect function fails. Reported-by: Peter Warasin <peter@endian.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'pppd/auth.c')
-rw-r--r--pppd/auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pppd/auth.c b/pppd/auth.c
index 2f81283..4271af6 100644
--- a/pppd/auth.c
+++ b/pppd/auth.c
@@ -553,6 +553,7 @@ link_required(unit)
void start_link(unit)
int unit;
{
+ status = EXIT_CONNECT_FAILED;
new_phase(PHASE_SERIALCONN);
hungup = 0;