From: Gilles E. <ges...@us...> - 2004-05-29 19:30:15
|
Update of /cvsroot/ipcop/ipcop/src/rc.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26018/src/rc.d Modified Files: Tag: IPCOP_v1_4_0 rc.red Log Message: Allow selective use of PAP only or CHAP only as a workaround for broken LTP2 gateway in PPPoA and CHAP mode (I do nothing for ISDN) Index: rc.red =================================================================== RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.red,v retrieving revision 1.29.2.14 retrieving revision 1.29.2.15 diff -C2 -d -r1.29.2.14 -r1.29.2.15 *** rc.red 15 May 2004 13:33:55 -0000 1.29.2.14 --- rc.red 29 May 2004 19:30:03 -0000 1.29.2.15 *************** *** 420,429 **** push(@pppcommand, ('usepeerdns')); } ! if ($pppsettings{'AUTH'} eq 'standard-login-script') { ! $loginscript = 'standardloginscript'; } ! elsif ($pppsettings{'AUTH'} eq 'demon-login-script') { ! $loginscript = 'demonloginscript'; } ! else { ! $loginscript = $pppsettings{'LOGINSCRIPT'}; } if ($pppsettings{'RECONNECTION'} eq 'persistent') { --- 420,434 ---- push(@pppcommand, ('usepeerdns')); } ! if ($pppsettings{'AUTH'} eq 'pap') { ! push(@pppcommand, ('-chap')); ! } elsif ($pppsettings{'AUTH'} eq 'chap') { ! push(@pppcommand, ('-pap')); ! } elsif ($pppsettings{'AUTH'} eq 'standard-login-script') { ! $loginscript = 'standardloginscript'; ! } elsif ($pppsettings{'AUTH'} eq 'demon-login-script') { ! $loginscript = 'demonloginscript'; ! } else { ! $loginscript = $pppsettings{'LOGINSCRIPT'}; ! } if ($pppsettings{'RECONNECTION'} eq 'persistent') { *************** *** 467,470 **** --- 472,481 ---- push(@pppcommand, ('usepeerdns')); } + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } + if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); *************** *** 605,609 **** push(@pppcommand, ('usepeerdns')); } ! if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); --- 616,626 ---- push(@pppcommand, ('usepeerdns')); } ! ! if ($pppsettings{'AUTH'} eq 'pap') { ! push(@pppcommand, ('-chap')); ! } elsif ($pppsettings{'AUTH'} eq 'chap') { ! push(@pppcommand, ('-pap')); ! } ! if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); *************** *** 641,644 **** --- 658,666 ---- push(@pppcommand, ('usepeerdns')); } + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); *************** *** 694,697 **** --- 716,724 ---- push(@pppcommand, ('usepeerdns')); } + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } if ($pppsettings{'RECONNECTION'} eq 'persistent') { *************** *** 746,749 **** --- 773,781 ---- push(@pppcommand, ('usepeerdns')); } + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } if ($pppsettings{'RECONNECTION'} eq 'persistent') { *************** *** 840,843 **** --- 872,880 ---- push(@pppcommand, ('usepeerdns')); } + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } if ($pppsettings{'RECONNECTION'} eq 'persistent') { *************** *** 967,970 **** --- 1004,1013 ---- if ($pppsettings{'DNS'} eq 'Automatic') { push(@pppcommand, ('usepeerdns'));} + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } + if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); *************** *** 1076,1079 **** --- 1119,1127 ---- '/usr/lib/pppd/2.4.2/pppoatm.so',$pppsettings{'VPI'}.".".$pppsettings{'VCI'},"$ENCAP"); if ($pppsettings{'DNS'} eq 'Automatic') { push(@pppcommand, ('usepeerdns'));} + if ($pppsettings{'AUTH'} eq 'pap') { + push(@pppcommand, ('-chap')); + } elsif ($pppsettings{'AUTH'} eq 'chap') { + push(@pppcommand, ('-pap')); + } if ($pppsettings{'RECONNECTION'} eq 'persistent') { push(@pppcommand, ('persist')); |