Commit Graph

173 Commits

Author SHA1 Message Date
Andrey A. Chernov
687ee69a2a Remove srandomdev fallback code 1997-06-14 00:27:03 +00:00
Brian Somers
e696ee3b80 Fix "delete ...", it now only insists on
one arg too.

Discovered by:	Rikk Salamat <rikks@web-impact.com>
1997-06-13 03:59:36 +00:00
Brian Somers
94b3022ec7 Add ppp.linkdown file to compliment ppp.linkup.
Submitted by:	Forgotten
Passed on by:	Terry Dwyer 61 8 9491 5161 <tdwyer@io.telstra.com.au>

Also remove extraneous setuid(0) - it's only undone by
the subsequent call to SelectSystem().
1997-06-13 02:07:32 +00:00
Brian Somers
582691713e Fix "show ?" alignment.
PR:		3830
Submitted by:	Josh Gilliam <josh@quick.net>
1997-06-13 00:09:54 +00:00
Brian Somers
6ea261e21d Document ppp over tcp (how to tunnel) 1997-06-13 00:04:58 +00:00
Brian Somers
0706ff3806 Sort out ppp over tcp:
o Allow "set var" with no args to blank var (don't req "").
  o Zero VarTerm ASAP if not in interactive mode.
  o Never print anything to stdout in -direct mode.
  o Count redial when failing to open modem.
  o Increase device size to 40 characters (for host:port).
  o Remove missed "if (fd == 0) fd = 1;".
  o Don't give up on incoming non-terminal connections.
1997-06-11 03:57:51 +00:00
Brian Somers
e979ce388b Make the man page a little more detailed.
Update the version number to 1.00.
Increase the predictor-1 buffer by 2 bytes.
1997-06-09 23:38:38 +00:00
Brian Somers
927145be97 Overhaul ppp:
o Use syslog
  o Remove references to stdout/stderr (incl perror())
  o Introduce VarTerm - the interactive terminal or zero
  o Allow "set timeout" to affect current session
  o Change "set debug" to "set log"
  o Allow "set log [+|-]flag"
  o Make MSEXT and PASSWDAUTH stuff the default
  o Move all #ifdef DEBUG stuff into the code - this
    shouldn't be too much overhead.  It's now controlled
    with "set log +debug"
  o Add "set log command, debug, tun, warn, error, alert"
  o Remove cdefs.h, and assume an ansi compiler.
  o Improve all diagnostic output
  o Don't trap SIGSEGV
  o SIGHUP now terminates again (log files are controlled
    by syslog)
  o Call CloseModem() when changing devices
  o Fix parsing of third arg of "delete"

I think this fixes the "magic is same" problems that some
people have been experiencing.
The man page is being rewritten.  It'll follow soon.
1997-06-09 03:27:43 +00:00
Brian Somers
0e6f6af18d Remove mis-leading version info. 1997-06-03 00:35:03 +00:00
Brian Somers
8f2fa0eeaf Back out last change (which in fact breaks rfc1661)
and modify the behaviour so that a timer is started
and the restart counter is zeroed (as per the State
Machine Diagram).

Pointed-out-by:	joerg
1997-06-02 00:04:40 +00:00
Brian Somers
ceb1cfa497 Go directly to ST_STOPPED when a TerminateReq is
received and after the TerminateAck is sent (as
per rfc1661) rather than to ST_STOPPING.  Going
to ST_STOPPING will leave us in a state where
we're waiting for the other side to do something -
not a good idea, especially as the client side sends
a TerminateReq then exits on idle timeout.
1997-06-01 14:37:19 +00:00
Brian Somers
0d8fb00071 Reduce MAX_M[RT]U back to 2048. Even on a null-modem
ppp link, we gain nothing with a larger mtu.

Suggested by:	joerg

Fix pred1 buffer size (must be == MAX_MTU)
1997-06-01 11:35:04 +00:00
Brian Somers
1f3dee4c22 Remove initial startup printf's in -direct mode.
Make "same magic" error send a NAK (as per rfc).
1997-06-01 03:43:26 +00:00
Brian Somers
da2b73b1ee Implement "set mtu" command to allow the client to
reduce the interface mtu.
Allow max mru spec of 16k.
Add "show m[rt]u" ability.
1997-06-01 01:13:04 +00:00
Brian Somers
e81574b54b Remove "set mtu ..." ability. Currently, this is an
"alias" for "set mru ...", but there's no such thing
as setting your mtu in the ppp protocol (rfc1661).
1997-05-31 16:37:19 +00:00
Brian Somers
e83481f965 Correct the return of DialModem()
Suggested by:	kfurge <kfurge@worldnet.att.net>
1997-05-29 02:29:13 +00:00
Brian Somers
6ed9fb2fc9 De-couple ppp from libalias. If libalias isn't there, the
alias commands simply won't work.  Only root may specify the
location of the alias lib (otherwise, it's hard-coded).

Make logprintf silently fail if LogOpen hasn't been called.

Suggested by:	eivind
1997-05-26 00:44:10 +00:00
Brian Somers
dcb1c20021 Include <alias.h>, not "alias.h" 1997-05-25 19:49:44 +00:00
Brian Somers
25aa96ac6c Fix the reconnect option, and add an explanation to vars.h 1997-05-24 17:32:42 +00:00
Brian Somers
f82fd8286c Finish updating for the latest alias code.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 05:34:15 +00:00
Brian Somers
c9bf343a4f Add SO_REUSEADDR socket opt in case the last telnet
connection is in a time_wait.

Submitted by:	Brian Campbell <brianc@pobox.com>
1997-05-23 05:22:48 +00:00
Brian Somers
6db75539f1 Use the latest alias engine - now in libalias.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 04:54:03 +00:00
Brian Somers
80e37c722b Output exit status description of child in background mode. 1997-05-19 03:02:36 +00:00
Brian Somers
6efd9292f6 Mega update to sort out bad implementations
of reconnect & -background.

o   Fix reconnect anomolies.
o   Make reconnect apply to failed LQR hangups (& mention in man page).
o   Make reconnect effective in -background mode.
o   Listen on socket in -background mode.
o   Try all phone numbers in -background mode.
o   Insist on system arg in -background mode.
o   Make a control-connection close command exit in -background mode.
o   Output status message to stdout on exit of parent in -background mode.
o   Don't notify parent of success too soon.
o   Describe termination EX_* code.
o   Miscelaneous diagnostic corrections.
o   Remove redundant connect_time from modem.c.
o   Don't repeatedly DownConnection().
1997-05-19 02:00:16 +00:00
Brian Somers
220e07d455 Make openmode active by default (for both client/server).
Requested by:	The masses.
1997-05-17 16:08:48 +00:00
Brian Somers
298091dacd Build pid_filename without a double slash.
Make ``Dial attempt'' diagnostics consistent.

Reset lostCarrier when it has reached max.
Suggested by:	Kevin Street <street@iName.com>
1997-05-14 01:18:51 +00:00
Brian Somers
ce72881634 Don't attempt to ioctl(modem...) when modem is
closed.  Just DownConnection().
1997-05-14 01:14:32 +00:00
Brian Somers
a85412b4a5 Correct the files section for tunX.pid and ttyXX.if 1997-05-13 09:31:05 +00:00
Brian Somers
f2d6d31a91 Correct sample file name. 1997-05-12 11:54:12 +00:00
Brian Somers
aefd026afb Create ttyXX.if and tunX.pid irrespective of
whether we're -dedicated.

Required by:	David Nugent <davidn@labs.usn.blaze.net.au>
1997-05-11 10:23:16 +00:00
Andrey A. Chernov
06d8e8d3f3 Cosmetique 1997-05-11 00:44:37 +00:00
Andrey A. Chernov
b1c4e61441 Print out reject masks on "show lcp" 1997-05-11 00:41:30 +00:00
Andrey A. Chernov
8706374189 Use random() for GenerateMagic() 1997-05-11 00:16:00 +00:00
Andrey A. Chernov
290281edbd Cosmetique fixes:
shorten help message to fit the screen
return to prompt from "show ipcp"
1997-05-10 23:46:29 +00:00
Brian Somers
057df964f4 Refuse to negotiate HISADDR of 0.0.0.0 (NAK it)
Submitted by:	NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
1997-05-10 15:37:40 +00:00
Brian Somers
41c6c54314 Add a ttyXX.if file in /var/run that points to
the tunX.pid file.  Change the ppp.tunX.pid name
to tunX.pid

Requested by:	Daniel O Callaghan <danny@panda.hilink.com.au>
1997-05-10 03:39:57 +00:00
Brian Somers
274e766c99 Tidy up the code - bounds checking, return
value checking etc.

Submitted by:	eivind
1997-05-10 01:22:19 +00:00
Brian Somers
13743c302f Don't reconnect (due to reconnect setting) after
close command.
1997-05-09 23:34:56 +00:00
Brian Somers
030340297a Set setitimer() arg correctly. 1997-05-09 20:48:21 +00:00
John Polstra
d8fa05fc47 Null commit to force version bump. 1997-05-09 16:16:31 +00:00
Brian Somers
cdc86cbc9f Allow mixed case commands.
Allow HISADDR, MYADDR, INTERFACE and ALL in mixed case.
1997-05-08 01:26:31 +00:00
Brian Somers
950c8929a7 Reset lqrsendcnt.
PR:		2449
Submitted by:	mark thompson <thompson@tgsoft.com>
1997-05-07 23:40:31 +00:00
Brian Somers
2f8fcf44da Only compress tcp packets. Calculate size of
logbuff rather than guessing at 2000.

PR:		2046
Submitted by:	torii@tcd.hitachi.co.jp
1997-05-07 23:30:50 +00:00
Brian Somers
e68d210e8f Allow up to 40 args in the chat script (was 20).
Ignore subsequent args rather than scribbling.

PR:		1952
Submitted by:	Mikael Hybsch <micke@free.dynas.se>
1997-05-07 23:01:25 +00:00
Brian Somers
2cd0474b47 Make ppp exit on loss of carrier in -background mode.
Submitted by:	Jim Carroll <jim@carroll.com>
1997-05-05 23:45:15 +00:00
Andrey A. Chernov
63202ff1e6 Log each ppp line to separate /var/log/ppp.tunX.log instead mixing of
all lines into single /var/log/ppp.log
1997-05-04 02:39:04 +00:00
Brian Somers
07030d97c1 Add a reconnect capability directing ppp to re-establish
the connection after an unexpected loss of carrier:

    set reconnect timer ntries

The man page warns against using this command when your
timeout value is slightly more than the other sides :{}

Suggested by: burton@bsampley.vip.best.com (Burton Sampley)
1997-04-21 01:02:02 +00:00
Andrey A. Chernov
4ded859ba2 Fix typo in previous commit 1997-04-19 11:31:38 +00:00
Poul-Henning Kamp
6b5f0ac2a3 Unceremoneously discard HDLC frames with less than two bytes in them.
XXX: real fix: this could should check the number of bytes in the packet
before accessing them.

Found by: phkmalloc
1997-04-19 09:25:58 +00:00
Brian Somers
4f72618556 Remove osreldate. I got the number wrong anyway :( 1997-04-15 00:03:36 +00:00