]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Default exit status to EXIT_CONNECT_FAILED during connection phase
authorPaul Mackerras <paulus@samba.org>
Mon, 11 Mar 2013 08:30:21 +0000 (19:30 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 11 Mar 2013 08:30:21 +0000 (19:30 +1100)
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>
pppd/auth.c

index 2f81283aceb9d4df9f302ae19e1815c5c36b7bf9..4271af687102dc62e3c2e3b47d3fc8ab1d70d0f8 100644 (file)
@@ -553,6 +553,7 @@ link_required(unit)
 void start_link(unit)
     int unit;
 {
 void start_link(unit)
     int unit;
 {
+    status = EXIT_CONNECT_FAILED;
     new_phase(PHASE_SERIALCONN);
 
     hungup = 0;
     new_phase(PHASE_SERIALCONN);
 
     hungup = 0;