Commit Graph

171 Commits

Author SHA1 Message Date
brian
747720e64d Document ppp over tcp (how to tunnel) 1997-06-13 00:04:58 +00:00
brian
5d18065463 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
84d5b39da1 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
94d661ac8c 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
9256ed6239 Remove mis-leading version info. 1997-06-03 00:35:03 +00:00
brian
e28b617f4a 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
5992baf27d 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
a58162b8e7 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
e39002afc2 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
0e77953308 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
ea3d6b0743 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
ba44f8b683 Correct the return of DialModem()
Suggested by:	kfurge <kfurge@worldnet.att.net>
1997-05-29 02:29:13 +00:00
brian
12b254e316 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
8089164d6f Include <alias.h>, not "alias.h" 1997-05-25 19:49:44 +00:00
brian
81067cb46e Fix the reconnect option, and add an explanation to vars.h 1997-05-24 17:32:42 +00:00
brian
a62138d5f0 Finish updating for the latest alias code.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 05:34:15 +00:00
brian
33deb302fe 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
6d0cdc4cfb Use the latest alias engine - now in libalias.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 04:54:03 +00:00
brian
d13ad90ef4 Output exit status description of child in background mode. 1997-05-19 03:02:36 +00:00
brian
ee01b28050 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
3d81388ebf Make openmode active by default (for both client/server).
Requested by:	The masses.
1997-05-17 16:08:48 +00:00
brian
82b9d3453b 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
0a48c2a0e8 Don't attempt to ioctl(modem...) when modem is
closed.  Just DownConnection().
1997-05-14 01:14:32 +00:00
brian
f362842283 Correct the files section for tunX.pid and ttyXX.if 1997-05-13 09:31:05 +00:00
brian
a61579672e Correct sample file name. 1997-05-12 11:54:12 +00:00
brian
665a2c9ba9 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
ache
1639d4d9ce Cosmetique 1997-05-11 00:44:37 +00:00
ache
6b0a735ac3 Print out reject masks on "show lcp" 1997-05-11 00:41:30 +00:00
ache
2f32718791 Use random() for GenerateMagic() 1997-05-11 00:16:00 +00:00
ache
36ab59d4ff Cosmetique fixes:
shorten help message to fit the screen
return to prompt from "show ipcp"
1997-05-10 23:46:29 +00:00
brian
1a9ed5bd57 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
625e8802da 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
82bac13560 Tidy up the code - bounds checking, return
value checking etc.

Submitted by:	eivind
1997-05-10 01:22:19 +00:00
brian
1da867bda7 Don't reconnect (due to reconnect setting) after
close command.
1997-05-09 23:34:56 +00:00
brian
6bf24e13fb Set setitimer() arg correctly. 1997-05-09 20:48:21 +00:00
jdp
fa7109d49f Null commit to force version bump. 1997-05-09 16:16:31 +00:00
brian
049664f16a Allow mixed case commands.
Allow HISADDR, MYADDR, INTERFACE and ALL in mixed case.
1997-05-08 01:26:31 +00:00
brian
2441d7631d Reset lqrsendcnt.
PR:		2449
Submitted by:	mark thompson <thompson@tgsoft.com>
1997-05-07 23:40:31 +00:00
brian
2d9bc1f640 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
c0df205f61 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
7394cdac99 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
ache
027d471e28 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
ad4ab18793 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
ache
2b13c9e076 Fix typo in previous commit 1997-04-19 11:31:38 +00:00
phk
0bbcc047cf 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
dfe24302ec Remove osreldate. I got the number wrong anyway :( 1997-04-15 00:03:36 +00:00
brian
aebb5d896e Make the next number redial ability configurable. The
"set redial pause [times]" command becomes
"set redial end-pause[.next-pause] [times]" and next-pause
defaults to 3 seconds.  This keeps things backwards
compatable.

Suggested by:	ache
1997-04-14 23:48:20 +00:00
brian
b2533fba6f Make -background option attempt each phone number at most
once.  Make -background ignore redial.  Output exit value
to syslog with "PPP Terminated" message.
1997-04-13 00:54:45 +00:00
brian
24892f8103 Only wait for the redial timeout when the last phone number in the
list has been dialed.  Alternate number dialing has no "pause".

Suggested by: joerg

Document this behaviour.  Document that the number of dial attempts
applies to the number of phone calls rather than the number of times
each number is dialed.  Add a missing .El.  Give a decent description
of how to connect to an ISP.
1997-04-12 22:58:41 +00:00
ache
9949bd676e Ignore SIGPIPE or any user can quit ppp just telnetting to it
and quitting telnet immediately (while phone number dialed)
Log client connection/disconnection with PHASE_BIT now.
Add more error recovery on client disconnection
1997-04-09 17:35:54 +00:00