Commit Graph

370 Commits

Author SHA1 Message Date
Andrey A. Chernov
cc2847b862 Remove private sleep/usleep hacks 1997-10-23 20:11:01 +00:00
Brian Somers
01db51af7a Fix various filter problems
PR:		4727
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp>
1997-10-23 10:09:35 +00:00
Brian Somers
a9e8f80739 Fix HDLC logging (actually LogDumpBp()). It was only
outputting the first mbuf in the chain.
1997-10-22 01:22:51 +00:00
Brian Somers
ee5c6273d7 Ask for VJ slot id compression by default. 1997-10-17 00:20:30 +00:00
Brian Somers
331953abc2 cosmetic:
o  Log client connection commands when "set log +command"
o  Don't display PAP password in the log unless we're
   "set log +debug".
1997-10-16 23:55:19 +00:00
Brian Somers
30bbbd3edd Initialise LCP, IPCP and CCP as soon as LCP is down.
Without this, in -auto mode, we stay in ST_STOPPING
and never check our dial filters to see if it's time
to bring the line up again.

This may make "set stopped" redundant.
1997-10-15 01:01:17 +00:00
Brian Somers
6f59cd11ea Un-spam ip_sum (arrgh - I don't know how this made
it into my patches :()
1997-10-12 21:43:55 +00:00
Brian Somers
0ebb52de1d Cosmetic: Mention that ppp is suspending before
executing a "shell" command.
1997-10-12 01:49:37 +00:00
Brian Somers
03604f3574 Support VJ maximum slot identifiers != 15.
Support VJ slot id compression.

Previously, ppp would negotiate a max slot between 2 & 15
(if asked), and would agree to slot id compression (if asked).
It would then proceed to use 16 slots and no compression
anyway.  The result was a rather unusable connection.
1997-10-07 00:56:58 +00:00
Brian Somers
e70c96ab58 Change things around a bit when bringing down the layers.
o LcpLayerDown() no longer does a NewPhase(PHASE_TERMINATE).
  Instead, it's done in LcpLayerFinish().  LayerFinish() gets
  called by the FSM after the LCP FSM goes through the Stopping
  and Stopped states.

o -direct and -background mode exit at PHASE_TERMINATE, not
  PHASE_DEAD.

The result is that LCP, CCP & IPCP are brought down cleanly on both
sides of the link (not just our side).  Killing ppp rather than just
closing it still makes it get out after the LCP SendTerminateReq().
I'll have a look at that soon.  We're probably not actually sending
the REQ :-(
1997-10-05 15:00:10 +00:00
Brian Somers
d37641d82c Refer a bit to pppctl.
Suggested (far to subtly for his own good) by:	joerg
1997-10-05 14:27:08 +00:00
Brian Somers
6c9e376dfe Cosmetic: Be specific about using TABs in syslog.conf. 1997-10-05 10:29:32 +00:00
Brian Somers
57fd05c48b Cosmetic: Log a strerror(errno) when failing to write to
the tun device.
1997-10-04 00:14:39 +00:00
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
Brian Somers
3f6fd9230e Correct the forth arg to "set ifaddr". If specified,
it gives the IP number that should be used for initial
IPCP config requests, irrespective of MYADDR.
1997-08-19 01:10:24 +00:00
Brian Somers
b48dfe09c7 Introduce the "bg" command. It's pretty
much the same as "shell", but it's in the
background.
1997-08-18 20:15:10 +00:00
Brian Somers
eb53eaa30b Fix possible buffer overrun while "expect"ing
something that's "nearly" what it wants.
1997-08-17 22:47:07 +00:00
Brian Somers
0444761561 Typo police 1997-08-17 22:45:25 +00:00
Brian Somers
71144dc552 Allow the use of a "stopped" timeout via the
"set stopped" directive.  If the timeout occurs
it will cause a "Down" event, hanging up the line
if it's still up.  This *isn't* part of the FSM
diagram, but I consider it ok as a "higher level
implementation specific timeout" as specified in
the rfc ;-}

Discussed briefly with:	joerg
1997-08-17 20:45:50 +00:00
Brian Somers
5b9b04192a Allow specification of fallback phone numbers to
be used only if the dial script fails.
PR:		4262
1997-08-17 20:38:45 +00:00
Brian Somers
868cddb5fa Use libalias.so.2.3. 1997-08-11 22:07:57 +00:00
Brian Somers
cad5afb077 Correct default log file name.
PR:		4065
Prompted by:	Steve Price <sprice@hiwaay.net>
Submitted by:	sjr1@flash.net
1997-08-10 22:03:20 +00:00
Brian Somers
05dce3eefc Use libalias.so.2.2 1997-08-03 20:21:22 +00:00
Brian Somers
bfbee26298 Remove extraneous prototypes. 1997-08-01 02:02:28 +00:00
Brian Somers
4eb8b1640d Set up the alias address before executing
the contents of ppp.linkup.
1997-07-29 22:37:04 +00:00
Brian Somers
6614d8c5f3 Fix file descriptor leaks. 1997-07-28 01:02:27 +00:00
Brian Somers
9ed2f0484a Count the "proto" arg after a single address,
Check correctly for "deny" packets.
Submitted by:	Dave Bodenstab <imdave@mcs.net>
1997-07-27 23:26:23 +00:00
Brian Somers
e9eb6d7aa4 Don't try to ioctl(,TIOCOUTQ,) on a closed
descriptor.
Reported by:	Stephane Raimbault <stephane@cybersurf.net>
1997-07-24 02:42:34 +00:00
Brian Somers
c09be724d6 Allow a "hangup" capability.
You can now "ATZ" your modem when it's closed.

Submitted by:	peter@citylink.dinoex.sub.org (Peter Much)
1997-07-14 01:41:35 +00:00
Brian Somers
7cc60a7478 Allow service names in "set server" 1997-07-12 19:22:34 +00:00
Poul-Henning Kamp
177c95e45a Reset all LQR variables when we start over. 1997-07-02 19:18:42 +00:00
Brian Somers
873725cc51 Make HUP cause an exit (as it used to), and make
INT cause a hangup - not exiting for -ddial & -auto.

HUP must exit because init sends this at system shutdown
time (why, I don't know), and we don't want to end up
redialing after the HUP (due to another dfilter packet).

Pointed out by and discussed with: ache
1997-07-01 21:31:28 +00:00
Brian Somers
01ec25112c Allow specification of a umask for local socket
creation in "set server" command.
1997-06-30 03:03:38 +00:00
Brian Somers
76c5241d63 Fix HUP handling while dialing.
Pointed out by:	ache
1997-06-29 13:54:31 +00:00
Brian Somers
186d0be47e Deal with HISADDR/MYADDR in filter rules.
Mostly submitted by: kfurge@worldnet.att.net

Allow MYADDR in add/delete commands to facilitate
dynamic additions of a loopback route to MYADDR.
1997-06-28 01:34:03 +00:00
Brian Somers
4ef16f24f2 Add "set server" to control the server socket.
Catch SIGUSR1 to re-init listening socket.
Document signal behaviour.

Add missing '\n's to LogPrintf(LogWARN,...)
Main() returns int not void.

AF_LOCAL ideal suggested a long time ago by: joerg
1997-06-25 19:30:05 +00:00
Brian Somers
2126fb65a3 Allow shell commands (still run as original user)
unless defined out - including while a telnet
session with a -auto ppp is in effect.  If you
don't create ppp.secrets, you deserve what you
get.

telnet connection capabilities will be configurable
per system soon.

Suggested by: Terry Dwyer <tdwyer@omen.net.au>
1997-06-25 02:04:35 +00:00
Brian Somers
030d3ce62a Fix ~? output in "term" mode.
Spotted by: Harry Starr <starr@gccs.com.au>
1997-06-24 21:25:06 +00:00
Brian Somers
368aee2ba3 o Fix uptime for direct connections.
o Style police
o Make hangup abort the current connection, not
  necessarily exiting (-auto/-ddial).
o Trap HUP and INT during DoChat and abort the
  connection attempt.  This means you can now
  type "dial" and change your mind with ^C, or
  HUP the process to stop it dialing.

Slapped into doing it by: Chuck Robey <chuckr@glue.umd.edu>
1997-06-23 23:10:13 +00:00
Brian Somers
c3a83f6777 Typo police.
Submitted by: Chuck Robey <chuckr@glue.umd.edu>
1997-06-23 23:08:23 +00:00
Brian Somers
a6ae823cc3 Fix "set parity"
PR:		3881
Actual problem found by:	shocking@mailbox.uq.edu.au
1997-06-23 19:18:13 +00:00
Brian Somers
9b5a20e10a Fix "delete all".
PR:		3913
1997-06-20 23:43:35 +00:00
Brian Somers
3b80c31921 Cosmetic: Fix help syntax. 1997-06-17 02:04:51 +00:00
Brian Somers
712ae38782 Handle redial tries correctly under -ddial 1997-06-17 01:46:05 +00:00
Brian Somers
55a8cdea92 Put TCP/IP logs back on one line. 1997-06-16 21:20:00 +00:00
Brian Somers
cc39a98fd5 Set netfd to STDOUT_FILENO rather than STDIN_FILENO. 1997-06-16 19:59:41 +00:00
Brian Somers
fd59deba96 Correct filter docs.
PR:		3464
Submitted by:	Stephen J. Roznowski <sjr1@flash.net>
1997-06-16 13:52:10 +00:00
Brian Somers
d656a4c582 Remove call to daemon(). Just call setsid() and close
any relevent descriptors (0,2,[1]).  We've already fork()d.
PR:		3874
1997-06-16 13:24:59 +00:00
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
Brian Somers
43ea9d19fa 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 Somers
4ed9958f49 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 Somers
c0139fb2e2 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