summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ipcp.c
Commit message (Collapse)AuthorAgeFilesLines
* If the peer asks for IP 0.0.0.0, choose an IP ourselvesbrian1997-12-191-2/+3
| | | | | without looking for it in our IP list (and if found, trying to ifconfig it!).
* Allow random IP number allocation to peer.brian1997-12-131-9/+30
| | | | | | | | | | | | | | | | | | | | Validate the peers suggested IP by attempting to make a routing table entry. Give up IPCP negotiation if the peer NAKs us with an unusable IP. Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device. Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't want)!!! Allow up to 200 interface names (was 50) (now that ppp can play server properly). Up the version number (1.5 -> 1.6). Cosmetic: Log unexpected CCP packets in the CCP log rather than the ERROR log. Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather than the ERROR log. Log failed route additions and deletions with WARN, not TCPIP. Log the option id and length for unrecognised IPCP options. Change some .Sq to .Ar in the man page.
* Correct cftypes128 index.brian1997-12-061-2/+2
|
* Remove duplicate REJECTED macro.brian1997-12-041-24/+18
| | | | Remove extraneous pointers.
* Abstract the CCP layer a level.brian1997-12-031-14/+27
| | | | Add DEFLATE support.
* Fix prototypes.brian1997-11-221-5/+7
| | | | | | | | | | | | | | Remove extraneous decls. Add ``const'' to several places. Allow ``make NOALIAS=1'' to remove IP aliasing. Merge with OpenBSD - only the Makefiles vary. We can now survive a compile with -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts (although the Makefile just contains -Wall).
* Add throughput logging (disabled by default).brian1997-11-181-58/+18
| | | | | Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt()
* Update the cftypes arrays according to rfc1700.brian1997-11-141-7/+28
| | | | Log IPCP reqests as IPCP.
* Finish the security improvements:brian1997-11-111-2/+2
| | | | | | | | | | | | | | | | | | | o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
* Don't pass global vars as args.brian1997-11-081-7/+7
| | | | Remove local/global conflicts.
* o Bump version to 1.3 to reflect major changesbrian1997-10-291-1/+2
| | | | | | | | | | | | o Report modem connect time properly o Report bytes in/out over physical media o Fix phases (TERMINATE is *higher than* DEAD) o Do a LayerFinish from LcpDown o Bring down IPCP & CCP when we enter PHASE_TERMINATE o Give a new prompt when we go to PHASE_DEAD o Stop the modem timer properly when idle o Treat sig 15 like an exiting carrier loss o Log (DEBUG) offline & online transitions
* Cosmetic:brian1997-10-261-1/+2
| | | | Move prototypes into the correct headers.
* Cosmetic (no functional changes):brian1997-10-261-43/+51
| | | | | | | | | | | | | | | o Add missing $Id$s o Move extern decls from .c -> .h files o Staticize o Remove #includes from .h files o style(9)ify includes o bcopy -> memcpy bzero -> memset bcmp -> memcmp index -> strchr rindex -> strrchr o Move timeout.h -> timer.h (making it consistent w/ timer.c) o Add -Wmissing-prototypes
* Ask for VJ slot id compression by default.brian1997-10-171-2/+2
|
* Support VJ maximum slot identifiers != 15.brian1997-10-071-1/+6
| | | | | | | | | 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.
* Bring CCP and IPCP layers down properly when LCPbrian1997-09-031-9/+39
| | | | | comes down. Give a count of bytes sent/received in IPCP log.
* Cosmetic: Make LogPrintf() calls consistent.brian1997-08-311-14/+11
|
* Make the code format more in line with style(9).brian1997-08-251-124/+112
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* Expand the "set stopped" command so that it canbrian1997-08-201-28/+30
| | | | | | | | 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.
* Correct the forth arg to "set ifaddr". If specified,brian1997-08-191-7/+13
| | | | | it gives the IP number that should be used for initial IPCP config requests, irrespective of MYADDR.
* Set up the alias address before executingbrian1997-07-291-3/+3
| | | | the contents of ppp.linkup.
* Add "set server" to control the server socket.brian1997-06-251-2/+2
| | | | | | | | | | 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
* Overhaul ppp:brian1997-06-091-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* De-couple ppp from libalias. If libalias isn't there, thebrian1997-05-261-3/+3
| | | | | | | | | 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-3/+3
| | | | Submitted by: Charles Mott <cmott@srv.net>
* Mega update to sort out bad implementationsbrian1997-05-191-1/+2
| | | | | | | | | | | | | | | | | | 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().
* Cosmetique fixes:ache1997-05-101-2/+2
| | | | | shorten help message to fit the screen return to prompt from "show ipcp"
* Refuse to negotiate HISADDR of 0.0.0.0 (NAK it)brian1997-05-101-3/+3
| | | | Submitted by: NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
* Tidy up the code - bounds checking, returnbrian1997-05-101-4/+8
| | | | | | value checking etc. Submitted by: eivind
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* 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-6/+8
| | | | | | | | | | | | | 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
* The infamous IP aliasing code for ppp, modified to work as a runtime optionjkh1996-12-121-1/+4
| | | | | | | (otherwise ppp's behavior remains unchanged) and documented by myself, Steve Sims, Nate Williams, Martin Renters and god-only-knows who else. :-) Submitted by: nate Obtained from: Charles Mott <cmott@srv.net>
* Add support for the Evil Microsoft ppp extentions. Yes, they did itjkh1996-10-061-2/+102
| | | | | | | | 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>
* Here is a diff of /usr/src/usr.sbin/ppp against current. The diffsphk1996-05-111-17/+17
| | | | | | | | | | | | | | | | | | | 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>
* Final cleanup for now. -Wall is now silent. A couple of bogons found.phk1996-01-111-3/+3
|
* Some implementation of PPP are required that starting a negotiaion byamurai1995-07-081-4/+19
| | | | | 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")
* Don't convert 0.0.0.0 into 192.0.0.1. I can find no sane reason to do this.dg1995-07-041-3/+1
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* 1.Reducing cpu usage at off connection.amurai1995-03-111-2/+2
| | | | | | | | | 2.Implment Redail function as working correctly. 3.Clean up a code as I notice. 4.Now, RTT getting close to 50ms with ISDN/TA 38400bps !! Reviewed by: amurai@spec.co.jp Submitted by: amurai@spec.co.jp
* New user Process PPP based on iij-ppp0.94beta2.amurai1995-02-261-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Supporting SYNC SIO device (But need a device driver) - add "set speed sync" o Fixing bug for Predictor-1 function. o Add new parameter that re-sent interval for set timeout commands. o Improving RTT (Round Trip Time) and reducing processor time. - Previous Timer service was using polling, and now using SIGALRM ;-) - A 0.94beta2 will not work correctly.... -- Follows are additinal feature not including 0.94beta2 o Support Proxy ARP - add "enable/disable proxy" commands o Marging common routine in CHAP/PAP. o Enhancing LCP/IPCP log information. o Support local Authfication connection on port 300x and tty. - You can set up pair of your "hostname -s" and password in ppp.secret. if either ppp.secret file nor your hostname line don't exist, It will notify a message and working as same as previous version.(Backword compatibility) - If you did set up them, It's allow connection but nothing to do except help and passwd command. - add "passwd yourpasswd" commands o Support afilter - keep Alive filter that a packet can send/receiving according to ifilter/ofilter but doesn't count it as preventing idle timer expires. - Same syntax of other filters. o Fixing bugs reported by current user for previous one. Thanks !! Reviewed by: Atsushi Murai (amurai@spec.co.jp)
* (no commit message)amurai1995-01-311-0/+459
OpenPOWER on IntegriCloud