summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement "set mtu" command to allow the client tobrian1997-06-011-7/+54
| | | | | | reduce the interface mtu. Allow max mru spec of 16k. Add "show m[rt]u" ability.
* Remove "set mtu ..." ability. Currently, this is anbrian1997-05-311-2/+2
| | | | | "alias" for "set mru ...", but there's no such thing as setting your mtu in the ppp protocol (rfc1661).
* Correct the return of DialModem()brian1997-05-291-2/+2
| | | | Suggested by: kfurge <kfurge@worldnet.att.net>
* De-couple ppp from libalias. If libalias isn't there, thebrian1997-05-261-15/+26
| | | | | | | | | 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
* Fix the reconnect option, and add an explanation to vars.hbrian1997-05-241-2/+2
|
* Use the latest alias engine - now in libalias.brian1997-05-231-6/+97
| | | | Submitted by: Charles Mott <cmott@srv.net>
* Mega update to sort out bad implementationsbrian1997-05-191-2/+6
| | | | | | | | | | | | | | | | | | 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().
* Build pid_filename without a double slash.brian1997-05-141-2/+2
| | | | | | | Make ``Dial attempt'' diagnostics consistent. Reset lostCarrier when it has reached max. Suggested by: Kevin Street <street@iName.com>
* Cosmetique fixes:ache1997-05-101-2/+2
| | | | | shorten help message to fit the screen return to prompt from "show ipcp"
* Add a ttyXX.if file in /var/run that points tobrian1997-05-101-1/+3
| | | | | | | the tunX.pid file. Change the ppp.tunX.pid name to tunX.pid Requested by: Daniel O Callaghan <danny@panda.hilink.com.au>
* Tidy up the code - bounds checking, returnbrian1997-05-101-14/+27
| | | | | | value checking etc. Submitted by: eivind
* Don't reconnect (due to reconnect setting) afterbrian1997-05-091-1/+2
| | | | close command.
* Allow mixed case commands.brian1997-05-081-10/+10
| | | | Allow HISADDR, MYADDR, INTERFACE and ALL in mixed case.
* Allow up to 40 args in the chat script (was 20).brian1997-05-071-3/+3
| | | | | | | Ignore subsequent args rather than scribbling. PR: 1952 Submitted by: Mikael Hybsch <micke@free.dynas.se>
* Add a reconnect capability directing ppp to re-establishbrian1997-04-211-8/+36
| | | | | | | | | | | 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)
* Make the next number redial ability configurable. Thebrian1997-04-141-3/+40
| | | | | | | | | "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
* Ignore SIGPIPE or any user can quit ppp just telnetting to itache1997-04-091-1/+2
| | | | | | and quitting telnet immediately (while phone number dialed) Log client connection/disconnection with PHASE_BIT now. Add more error recovery on client disconnection
* Use srandomdev() to initialize RNGache1997-03-241-2/+3
|
* Convert srandom() arg cast to Lite2 styleache1997-03-171-2/+2
|
* Do not re-initialize random numbers generator several times.ache1997-03-101-2/+6
| | | | Use ^ getpid() to produce better initial state.
* Don't waste time scanning tun_in+10 descriptors, scan exactly whatache1997-03-101-4/+2
| | | | | | | 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
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make it possible to substitute INTERFACE when executing commands.phk1997-02-221-0/+5
|
* Fix a benign typo (benign by now, since sizeof(VarLoginScript) ==joerg1997-02-021-1/+1
| | | | | | sizeof(VarDialScript)). Submitted by: Arjan.deVet@adv.IAEhv.nl (Arjan de Vet) -- or actually by imp?
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix many buffer overruns in the code. Specifically, disallow ExpandStringimp1997-01-101-1/+7
| | | | | | | | | | | | | to be used to expand things beyond the size of the buffer passed in. Also do a general cleanup of sprintf -> snprintf as well as strcpy and strncat safety. Also expand some buffers to allow for the largest possible data that might be used. This is a 2.2 candidate. However, it needs to be vetted on -current since little testing has been done on this due to my lack of PPP on this machine. Reviewed by: Jordan Hubbard, Peter Wemm, Guido van Rooij
* For /usr/sbin/ppp, you must choose between running ppp in the background orjkh1996-12-221-7/+6
| | | | | | | | | | | | | | | | | | | | | | connecting to a host immediately in the foreground. I would like to be able to run ppp from a script so that my script can be sure that it is connected to the 'net before it continues running: # Dial up the internet. ppp -background myprovider || exit 1 do-some-net-command # Hang up the modem. kill -HUP `cat /var/run/ppp.tun0.pid` Another problem is that the current ppp calls its process id file `/var/run/PPP.server', which may conflict if you have more than one IP tunnel interface available. Closes PR#1469 Submitted by: Gord Matzigkeit <gord@enci.ucalgary.ca>
* Make CRTSTS selection a runtime option. Closes PR#1392jkh1996-12-221-1/+20
| | | | Submitted by: Mike McGaughey <mmcg@heraclitus.cs.monash.edu.au>
* Added my 'ddial' patches to user-PPP. The new mode tries it's darndestnate1996-12-031-2/+4
| | | | | | | to keep the link up, so it re-dials whenever it detects the link go down. This is useful for 'dedicated' links who use PPP. It's been used for over a year w/out problems at different sites.
* Fixed the security leek I introduced the other day, nowsos1996-10-131-3/+10
| | | | | shell command is only executabel from command files, not from the commandline.
* 1. Room to calculate MD5 for CHAP negotiation is shorter thanjkh1996-10-121-4/+8
| | | | | | | | | | | | | | | | required. a core is not dumped at first connecting time and dumped at second or third time. (patch I) 2. A routine for "show route" refers out of allocated space. Values pointed by "lp" should be read as CHAR, I think. there is also no free() for disallocation. (patch II) Here is also a patch for an improvement: In current imprementation, even if PPP connection is disconnected by time out, prompt of interactive mode does not change from "PPP>" to "ppp>" to indicate the disconnection on a terminal. So I modified the code to do that. (patch III) Submitted-By: NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
* Allow shell commands in all modes.sos1996-10-101-3/+3
| | | | Old behavior can be had with define SHELL_ONLY_INTERACTIVELY
* Add the feature to use MYADDR & HISADDR macroes as arguments tosos1996-10-071-2/+12
| | | | a shell escape.
* Add support for the Evil Microsoft ppp extentions. Yes, they did itjkh1996-10-061-1/+76
| | | | | | | | on their own without even attempting to get concensus in the IETF, but there are also lots of Win95/NT boxes out there. CLoses PR#1494 Submitted-By: Peter Childs <pjchilds@imforei.apana.org.au>
* Moved getdtablesize() out of a loop.bde1996-09-281-3/+4
|
* Prepare for exec properly and check return valuesache1996-06-091-4/+9
| | | | Submitted by: Arjan de Vet <devet@IAEhv.nl>
* Here is a diff of /usr/src/usr.sbin/ppp against current. The diffsphk1996-05-111-3/+4
| | | | | | | | | | | | | | | | | | | add some logging functionality which I find very useful. 'set debug link' will record just link up/down and address assignments. 'set debug connect' will record the entire chat dialog 'set debug carrier' will record just chat lines including 'CARRIER' (so that I can be sure I'm getting a 28.8 line). There was a global change required to permit LogPrintf to take a bit mask instead of a bit position value (to permit logging some events on either of two flags, so that no change in 'set debug lcp' would result from the code supporting 'link'. Thus the diffs are rather long for such a small change. The man page is also touched. Oh, and there was a slight syntax problem in route.c Reviewed by: phk Submitted by: Tony Kimball <alk@Think.COM>
* Prevent dial cycling on the last phone from the list, make phone list copyache1996-03-081-2/+3
|
* 1) Add multi-phone dialing/redialing, several phones separated by ':'ache1996-03-081-7/+11
| | | | | | | | | | 2) Improve on-line help subsystem 3) Make 'term' mode works even carrier dropped (old code close line forever here) 4) Make 'term' mode 8bit clean. 5) Improve manual page 6) #ifdef DEBUG diagnostic about missing optional files. 7) Don't put interactive dialing info to logfile
* Use libmd's MD5.phk1996-01-301-4/+4
| | | | | inline hdlc checksum calculation. make big tables const.
* Final cleanup for now. -Wall is now silent. A couple of bogons found.phk1996-01-111-4/+5
|
* My freshly aborted 'make world' has pointed out that the wait.h includepeter1996-01-111-2/+2
| | | | file is <sys/wait.h>, not <wait.h> as was recently committed.
* A random bunch of cleanup changes.phk1996-01-101-2/+4
|
* 1. Add a settable redial timer and logging of the process id in a file.amurai1995-10-081-12/+86
| | | | | | | | | | | | | | | A settable redial timer helps to avoid the problem where both ends of a link want to dial at the same time and the line winds up busy for both ends. The process id is logged in /var/run/PPP.system where system is the name of the called system. When both ends of a link are running in demand dial mode, you need an easy way to get the pid of the ppp on the called end so it can be killed and re-started with -direct or pppd started to handle the incoming ppp session. 2. Add secret description for "set timeout" to man. Reviewed by: Atsushi Murai <amurai@spec.co.jp> Submitted by: John Capo <jc@irbs.com>
* 1. Do not log the password itself to ppp.log ( Mr. Rich Murphey )amurai1995-09-021-3/+68
| | | | | | | | | 2. Add ability to execute shell commands and suspend back into invoking shell (Mr. J Wunsch) Reviewed by: amurai@spec.co.jp Submitted by: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Rich Murphey <rich@lamprey.utmb.edu>
* 1. Clean up log message.amurai1995-07-081-2/+3
| | | | | | | | 2. Optimize ModemQlen. 3. Sending ProtoReject for Unknow protocol (i.e. IPX) 4. Avoid select looping by reading tun under the high system load. 5. Adding Local version String for maintenance. 6. Just more speak rather silent ignore if you type invalid key words.
* Some implementation of PPP are required that starting a negotiaion byamurai1995-07-081-1/+7
| | | | | sending *special* value as my address, even though the standard of PPP is defined full negotiation based. (e.g. "0.0.0.0" or Not "0.0.0.0")
* manupilation -> manipulation.phk1995-06-161-2/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Fixing follows and John's fruent explnation than my English....amurai1995-04-161-1/+2
| | | | | | | | | | | | | | | | | | | | | The first problem I found was that descriptor 0 was being closed. This happens because the modem variable is set to 0 to indicate that it is not valid but there are not enough tests for the modem variable being 0. You can see where I have done this in the patch. Code in OpenModem() dups the modem descriptor if it is < 3. Once this happened the modem was always open and an incomming call would have getty and ppp reading the modem. Descriptor 1 is closed when the quit command was executed from a telnet connection. The next modem open returns descriptor 1 and this gets duped leaving the modem always open again. The modem was not being closed when the connection dropped or was closed from the other end. The UUCP lock was also not removed if the modem could not be opened. Reviewed by: Atsushi Murai <amurai@spec.co.jp> Submitted by: John Capo <jc@irbs.com>
OpenPOWER on IntegriCloud