Commit Graph

257 Commits

Author SHA1 Message Date
Brian Somers
8bfa2d0ed9 If "set mtu" is used, *and* the mtu is less than the
value requested by the peer, NAK using this value
rather than silently just changing the interface
mtu.
1997-09-29 19:40:16 +00:00
Brian Somers
4e556546a8 Test for the existence of ../../secure rather
than /usr/include/des.h before building with MSChap.
support.  Also allow -DNOCRYPT (as well as -DNOSECURE)
as an override
sbin/init example pointed out by: bde
1997-09-28 20:17:59 +00:00
Brian Somers
fde958c3d3 Don't depend on time.h including sys/types.h 1997-09-27 19:41:40 +00:00
Brian Somers
f0d4fed251 Don't login twice when using passwdauth
Suggested by:	Peter Childs <pjchilds@imforei.apana.org.au>
Merge the whole module into a few lines in pap.c
1997-09-27 19:11:43 +00:00
Brian Somers
252715a39c #define RECON_ENVOKED as 4 (not 3, like RECON_UNKNOWN)
Pointed out by:	tom@tomqnx.com (Tom Torrance at home)
1997-09-26 00:23:36 +00:00
Brian Somers
0f8e0938a0 Do the MSChap encryption.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:58:20 +00:00
Brian Somers
7351f9d8e8 Allow Microsoft CHAP authentication.
This is a combination of MD4 & DES.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:52:37 +00:00
Brian Somers
c06022153e Don't luse uu_lock in -direct mode. It conflicts w/
hylafax & the like.
Get the CD bit right at last - now that I've got
my second modem back - loss of carrier makes ppp exit.
1997-09-23 22:07:51 +00:00
Brian Somers
3f1125194b Undo botched commit (local changes got in) 1997-09-23 19:52:14 +00:00
Brian Somers
301127fb0a Don't allow accept/deny when it's not appropriate.
Log PAP/CHAP users in utmp & wtmp, allowing it to
be avoided with "disable utmp"
1997-09-22 23:59:16 +00:00
Brian Somers
586526be29 Don't pause for one second before starting LCP
negotiation.  Instead, incrementally pause after
receiving LCPs with the same magic.  We can now
suffer a server that waits more than 1 second before
responding.  Pauses greater than a second get
hopelessly confusing as when the server eventually
starts, it sees a flood of Config Requests followed
by config NAKs and changes of magic.  This causes the
server to change its magic over and over.....
1997-09-22 02:51:24 +00:00
Brian Somers
3defb7fc30 Use the correct device name in "show modem" 1997-09-22 00:55:46 +00:00
Brian Somers
35495bec8d Correct the way the uucp lock file and the ttyXX.if lock
file get created.  We don't create lock files over non-tty
connections, but we *do* create lock files in -direct mode.
This leaves us capable of adding utmp/wtmp support for
successful pap & chap logins (coming soon).
1997-09-22 00:46:56 +00:00
Brian Somers
94cad8bcb1 Sleep for a second before sending the first LCP
config request.  This stops us from squirting stuff
down a line that still has ECHO turned on because the
peer hasn't had a chance to start yet.
Lead to the cause by:	Greg Lehey <grog@lemis.com>
1997-09-21 23:01:34 +00:00
Brian Somers
c47cab6191 It turns out that the following:
close(1);
  close(2);
  x = open(ctermid(NULL), O_RDWR|O_NONBLOCK);
  close(0)
on a tty causes select() to return an exception for descriptor x !
This is the case in RELENG_2_2, but not in 2.2.2.  I'm not sure why.
Instead of doing the x=open() and close(0), we just do x=0 now.
Problem pointed out by: Greg Lehey <grog@lemis.com>
                        Tomi Vainio <tomppa@fidata.fi>
1997-09-21 20:26:47 +00:00
Brian Somers
705c7a18f9 Typo police
Submitted by:	Mark Cammidge <mark@gmtunx.ee.uct.ac.za>
1997-09-21 13:08:00 +00:00
Brian Somers
599864f851 Add a pppctl(8) xref.
Suggested by:	joerg
1997-09-21 13:06:43 +00:00
Brian Somers
fd2bc5eb1d Don't close(1) in direct mode and then proceed to
isatty(1) !  Keep 0 open for this till the modem's
been set up by either dup()ing 0 or by opening
ctermid(NULL) (if isatty(0)).

Discussed problem with: Tomi Vainio <tomppa@fidata.fi>
Made it finally dawn on me: Angelo Turetta <ATuretta@stylo.it>
1997-09-18 00:15:25 +00:00
Brian Somers
f919b46768 Support CHAP using MD4
Suggested by: jordan
1997-09-17 23:17:57 +00:00
Brian Somers
bc24029963 o Fix two unlikely descriptor leaks.
o Output the correct device for "show modem"
  while in -direct mode.
o Cosmetic:  Moan a bit more when we can't open
  the [modem] device.
o Call OpenModem() in a more "natural" way.
o Add some LogDEBUG in OpenModem().
1997-09-16 23:15:16 +00:00
Brian Somers
b0f5f9ed37 Get rid of missing-prototype-warning 1997-09-10 23:55:35 +00:00
Brian Somers
f7fdd41d4a PRED1 => TY_PRED1 (oops) 1997-09-10 21:36:54 +00:00
Brian Somers
29a6597c6b o Initialize the PRED1 input queue when we
receive the ResetAck, NOT when we send the
   ResetReq (as per the rfc).
o  SILENTLY ignore CCPs that arrive *before*
   the network phase (as per the rfc).
o  Check that we've actually negotiated PRED1
   before sending PRED1 output.
   This bug has been around for a *VERY* long
   time !  We shouldn't need to explicitly disable
   PRED1 now :-)
1997-09-10 21:33:32 +00:00
Brian Somers
10a91a42fc Cosmetic: Remove unused variables and build on OpenBSD. 1997-09-10 02:20:35 +00:00
Brian Somers
23a1cfaa6a Allow dial to work in non-interactive mode. 1997-09-09 23:56:29 +00:00
Brian Somers
3732c71b01 Print errors correctly (don't adjust
argc/argv for commands).
1997-09-09 23:23:24 +00:00
Brian Somers
ff9d952578 Don't start an interactive shell from a
telnet prompt.
1997-09-09 23:13:31 +00:00
Brian Somers
d40f8a5a61 Correct ppp authentication defaults in interactive
mode.  We don't want to be forced to type a password
here :-(
Pointed out by: mouth@ibm.net (John Kelly)

While I'm there, don't allow a "set server" in
interactive mode.
1997-09-09 21:51:39 +00:00
Brian Somers
506474c87a Document the use of PAP/CHAP properly. 1997-09-09 21:01:53 +00:00
Brian Somers
881a8bbf54 Disable LQR by default. It causes too many problems
with too many ISPs to be a good default.  LQR is still
accepted by default.
1997-09-07 01:00:06 +00:00
Brian Somers
8742662039 Use __libalias_version to derive the name to
pass to dlopen().
1997-09-06 11:16:02 +00:00
Brian Somers
683cef3c33 Install as group ``network''
Insist that uid == 0 for client ppp
Disallow client sockets if no password is specified
Don't exit on failure to open client socket for listening
Allow specification of null local password
Use reasonable size (smaller) ``vector''s in auth.c
Fix "passwd ..." usage message
Insist on "all" as arg to "quit" (if any)
Drop client socket connection before Cleanup() when "quit all"
1997-09-04 00:38:22 +00:00
Brian Somers
5b4c5b0055 Bring CCP and IPCP layers down properly when LCP
comes down.  Give a count of bytes sent/received
in IPCP log.
1997-09-03 02:08:20 +00:00
Brian Somers
b6d7b1e061 Allow the transition from an idle timeout value
of zero (no timeout) while IPCP is up.
Move some prototypes into .h files and re-order
some includes.
1997-09-03 00:40:51 +00:00
Brian Somers
afc7fa2c18 Cosmetic: Make LogPrintf() calls consistent. 1997-08-31 22:59:49 +00:00
Brian Somers
021352282c Make ppp owner root.ppp, mode 4550
Suggested by: guido
Condoned by: eivind
1997-08-31 20:18:03 +00:00
Brian Somers
709db7fbee Remove use of login_progok()
Suggested by: guido
1997-08-31 20:07:03 +00:00
Brian Somers
ce28475da5 Use login_progok(). 1997-08-27 20:11:16 +00:00
Brian Somers
4e752f44f0 Check the "prog.deny" login.conf capability and
refuse to run if "ppp" is in the list.
Suggested by:	"Daniel O'Callaghan" <danny@panda.hilink.com.au>
1997-08-26 23:20:16 +00:00
Brian Somers
f525ead3dd Lose a couple of extraneous backslashes. 1997-08-25 01:52:11 +00:00
Brian Somers
944f709824 Make the code format more in line with style(9).
Update loadalias to use the new libalias api.
Update to version 1.1.
1997-08-25 00:29:32 +00:00
Brian Somers
81816fc583 Phone the number after the ``|'' whether the dial
OR login script fails.

Catch a small typo in the man page.
1997-08-23 23:14:24 +00:00
Brian Somers
e47c8739d5 Update version number to 1.02 so that I can tell what
people are running
1997-08-21 17:20:00 +00:00
Brian Somers
c16615aa8b Update doc to use MYADDR in ppp.conf. 1997-08-21 17:16:21 +00:00
Brian Somers
1d205e1313 Allow the use of HISADDR & MYADDR in ppp.conf. 1997-08-21 17:07:30 +00:00
Brian Somers
de451c685c Add "set loopback on|off", defaulting to "on".
This tells ppp to loopback packets addressed to
the ppp interface IP coming *from* the tun
device.

This means that you can ping the tun interface IP
from inside :-)
1997-08-21 16:21:39 +00:00
Brian Somers
91fc7145dc Correct online usage message for "set ? stopped" 1997-08-21 16:18:07 +00:00
Brian Somers
cb611434af Expand the "set stopped" command so that it can
idependently time out any of the FSMs.

Split LCP logging into LCP, IPCP and CCP logging,
and make room in "struct fsm" for the log level
that the state machine should use.
1997-08-20 23:47:53 +00:00
Daniel O'Callaghan
d053d1b926 Spelling police. 1997-08-19 11:27:00 +00:00
Daniel O'Callaghan
441de788b1 Typo fixes. 1997-08-19 11:18:34 +00:00