Commit Graph

157 Commits

Author SHA1 Message Date
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
Andrey A. Chernov
e0d3e2336f 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
Brian Somers
687d0cdeb3 Remove the syslog stuff, and allow various return values
in uu_lock().  Add uu_lockerr() for turning the results of
uu_lock into something printable.  Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly  where it should.

Suggested by:	ache@freebsd.org
1997-03-31 22:51:00 +00:00
Brian Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
Andrey A. Chernov
6a95b13d8d Use srandomdev() to initialize RNG 1997-03-24 16:01:46 +00:00
Andrey A. Chernov
7b50678a36 Convert srandom() arg cast to Lite2 style 1997-03-17 14:47:56 +00:00
Brian Somers
9163ee5e9d Oops - forgot to document the new -HUP action.
This should make 2.2 if the HUP stuff (earlier today) does.
1997-03-13 21:39:41 +00:00
Brian Somers
6e4959f072 Closes pr 2711
Fix -background option.  Parent returns after the line is established
(or not established).
Definitely a candidate for 2.2
1997-03-13 21:22:09 +00:00
Brian Somers
c6c740be8b Requested by: Harlan Stenn <Harlan.Stenn@pfcs.com>
Accept SIGHUP as a "re-open logfile" signal.  As ppp
doesn't set it's serial line to it's controlling terminal,
we can use HUP :)

This is a candidate for 2.2.  The log.[ch] changes won't
conflict, but the main.c changes will.  We just want to change the
kill(...,SIGHUP) to a SIGTERM and change the signal(SIGHUP,Hangup)
to a pending_signal(SIGHUP,LogReOpen).
1997-03-13 14:53:55 +00:00
Brian Somers
f5ff0f7c99 Reviewed by: ache@freebsd.org
These changes should fix the signal "problems" in ppp.
The signal changes should really be put into 2.2 too !
The following patches should do it.  There were some other
changes made by Andrey recently that havn't been brought
into 2.2, it may be worth doing them now.
1997-03-13 12:45:35 +00:00
Andrey A. Chernov
359ceb95ec Do not re-initialize random numbers generator several times.
Use ^ getpid() to produce better initial state.
1997-03-10 08:04:15 +00:00
Andrey A. Chernov
87e63218ab Detect failure open condition for direct mode now
Don't assume that modem descriptor must be >=3 in CloseModem,
just assume it is any valid descriptor >=0
1997-03-10 06:54:58 +00:00
Andrey A. Chernov
780700e5ed Don't waste time scanning tun_in+10 descriptors, scan exactly what
we need now.
Don't assume that file descriptor can't be 0 (many places)
Protect FD_* macros from being used with negative descriptors
Shorten MS EXT show help to fit 80 cols
1997-03-10 06:21:02 +00:00
Andrey A. Chernov
8ea7f0577b cdefs cleanup 1997-03-09 20:09:17 +00:00