summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* I misunderstood the failure mode - revert BINMODE to 4554. I'm stilljkh1999-08-271-2/+2
| | | | | | | going to remove ppp from the installation options in 5 days if ppp is still broken, however, as it hasn't worked at installation time for several weeks now and it's only causing people to fill my mailbox with questions.
* I don't know who decided that an install mode of 4544 was correct, butjkh1999-08-271-2/+2
| | | | | for a binary it's far from it. This is why sysinstall is unable to run ppp at startup time and causing weirdies in -current.
* Cosmetic: bring closer to RELENG_3brian1999-08-231-3/+3
|
* NOALIAS -> NONATbrian1999-08-221-4/+4
| | | | Reminded by: jkh
* Don't includei 4b support on the alphabrian1999-08-081-2/+2
|
* Add ISDN support via isdnd & i4b. This requires versionbrian1999-08-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 0.81.1 of the i4b code - namely support of the I4B_VR_REQ ioctl via the i4brbchX device. Ppp controls the phone number, but idle timers and SYNC/RAW decisions are still made by isdnd (in isdnd.rc). This involves a new datalink state machine phase. The ``wait for carrier'' phase happens after dialing but before logging in. The whole dial state should really be abstracted so that each device type can deal with it in its own way (thinking about PPPoE) - but that'll have to wait. The ``set cd'' symantics remain the same for tty devices, but we now delay until we either get CD or timeout waiting (at which time we drop the link if we require CD). For i4b devices we always insist on carrier. Thanks to hm@ for his help, and especially for pointing out that I *don't* need to re-implement isdnd (that was a huge waste of time !) :-]
* Be more non-crypto friendly at make release time.phk1999-05-151-2/+2
|
* Allow ``host:port/udp'' devices and support ``host:port/tcp'' asbrian1999-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | being the same as the previous (still supported) ``host:port'' syntax for tcp socket devices. A udp device uses synchronous ppp rather than async, and avoids the double-retransmit overhead that comes with ppp over tcp (it's usually a bad idea to transport IP over a reliable transport that itself is using an unreliable transport). PPP over UDP provides througput of ** 1.5Mb per second ** with all compression disabled, maxing out a PPro/200 when running ppp twice, back-to-back. This proves that PPPoE is plausable in userland.... This change adds a few more handler functions to struct device and allows derivations of struct device (which may contain their own data etc) to pass themselves through the unix domain socket for MP. ** At last **, struct physical has lost all the tty crud ! iov2physical() is now smart enough to restore the correct stack of layers so that MP servers will work again. The version number has bumped as our MP link transfer contents have changed (they now may contain a `struct device'). Don't extract the protocol twice in MP mode (resulting in protocol rejects for every MP packet). This was broken with my original layering changes. Add ``Physical'' and ``Sync'' log levels for logging the relevent raw packets and add protocol-tracking LogDEBUG stuff in various LayerPush & LayerPull functions. Assign our physical device name for incoming tcp connections by calling getpeername(). Assign our physical device name for incoming udp connections from the address retrieved by the first recvfrom().
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-6/+7
| | | | | | | | | | | | | | | | | | | | | the layering. We now ``stack'' layers as soon as we open the device (when we figure out what we're dealing with). A static set of `dispatch' routines are also declared for dealing with incoming packets after they've been `pulled' up through the stacked layers. Physical devices are now assigned handlers based on the device type when they're opened. For the moment there are three device types; ttys, execs and tcps. o Increment version number to 2.2 o Make an entry in [uw]tmp for non-tty -direct invocations (after pap/chap authentication). o Make throughput counters quad_t's o Account for the absolute number of mbuf malloc()s and free()s in ``show mem''. o ``show modem'' becomes ``show physical''.
* MAINTAINER=brian@FreeBSD.orgbrian1999-01-281-1/+3
|
* Initial RADIUS support (using libradius). See the man page forbrian1999-01-281-9/+17
| | | | | | | | | | | | | | | | | | | details. Compiling with -DNORADIUS (the default for `release') removes support. TODO: The functionality in libradius::rad_send_request() needs to be supplied as a set of routines so that ppp doesn't have to wait indefinitely for the radius server(s). Instead, we need to get a descriptor back, select() on the descriptor, and ask libradius to service it when necessary. For now, ppp blocks SIGALRM while in rad_send_request(), so it misses PAP/CHAP retries & timeouts if they occur. Only PAP is functional. When CHAP is attempted, libradius complains that no User-Password has been specified... rfc2138 says that it *mustn't* be used for CHAP :-( Sponsored by: Internet Business Solutions Ltd., Switzerland
* Solve the ``first connection'' problem that occurs onbrian1998-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | demand-dial links with dynamic IP numbers where the program that causes the dial bind()s to an interface address that is subsequently changed after ppp negotiation. The problem is defeated by adding negotiated addresses to the tun interface as additional alias addresses and providing a set of ``iface'' commands for managing the interface. Libalias is also required (and what a name clash!) - it happily IP-aliases the address so that the source is that of the primary (negotiated) interface and un-IP-aliases it on the way back. An ``enable iface-alias'' is done implicitly by the -alias command line switch. If -alias isn't given, iface-aliasing is disabled by default and can't be enabled 'till an ``alias enable yes'' is done. ``alias enable no'' silently disables iface-alias. So, for dynamic-IP-type-connections, running ``ppp -alias -auto blah'' will work for the first connection, although existing bindings will not survive a disconnect/connect as the TCP peer will be trying to send to the old IP address - the packets won't route. It's now a lot easier to add IPXCP to ppp with minor updates to the new iface.[ch] (if anyone ever gets 'round to it). It's also now possible to manually add interface aliases with something like ``iface add 1.2.3.4/24 5.6.7.8''. This allows multi-homed ppp links :-)
* Specify BINOWN explicitly - we don't want to depend on bsd.own.mkbrian1998-10-201-0/+1
| | | | setting it to ``root''.
* Remove useless `BINOWN=root' now that it is the default.obrien1998-09-191-2/+1
|
* Remove OpenBSD build support - let the Makefile vary perbrian1998-08-311-13/+1
| | | | | | OS rather than making it a mess and potentially screwing up cross builds. Suggested by: bde
* Add OpenBSD build supportbrian1998-08-301-1/+7
|
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-2/+2
| | | | | | | | | | | | | | (see the new ``set callback'' and ``set cbcp'' commands) o Add a ``cbcp'' log level and mbuf type. o Don't dump core when \T is given in ``set login'' or ``set hangup''. o Allow ``*'' and blanks as placeholders in ppp.secret and allow a fifth field for specifying auth/cbcp dialback parameters. o Remove a few extraneous #includes o Define the default number of REQs (restart counter) in defs.h rather than hardcoding ``5'' all over the place. o Fix a few man page inconsistencies.
* Don't dlopen()/dlsym() libalias, use it in the same waybrian1998-06-271-5/+10
| | | | as the rest of the world uses libraries.
* DISTRIBUTION=desbrian1998-06-261-1/+2
|
* o If we come out of select() with only write descriptors thatbrian1998-06-241-3/+3
| | | | | | | | | | | end up writing zero bytes, sleep for 1/10 of a second so that we don't end up using up too much cpu. This should only ever happen on systems that wrongly report a descriptor as writable despite the tty buffer being full. Discussed with: Jeff Evarts o Do an initial run-time check to see if select() alters the passed timeval. This knowledge isn't yet used, but will be soon.
* $@ is deprecated, use longer forms of single char macrosimp1998-06-091-3/+3
|
* Fix previous commit. bit 1 is the execute bit, not the read bit *blush*brian1998-06-071-2/+2
| | | | | ie, BINMODE=4551 -> BINMODE=4554 Pointed out by: Bruce Evans <bde@zeta.org.au>
* Make ppp world-readable so that root can get at it overbrian1998-06-071-2/+2
| | | | | | NFS when nobody isn't in group network :-) Pointed out by: Bruce Evans <bde@zeta.org.au>
* Remove -Wpointer-arithbrian1998-05-211-2/+2
|
* MFMP: Make ppp multilink capable.brian1998-05-211-10/+18
| | | | See the file README.changes, and re-read the man page.
* Don't moan about not creating tunX.pid and ttyX.if if RELEASE_CRUNCHbrian1998-01-291-1/+5
| | | | is defined.
* Remove the necessity of -ldes and -lalias etc from release/Makefile.brian1998-01-171-3/+12
| | | | | | | | | | When building a release, RELEASE_CRUNCH is defined for a `make' of the objects required by the crunch of each program. The object list is still obtained in the same way, so you must make sure that all objects are built (empty if necessary) by this make. ppp/Makefile provides an example. Reviewed by: jkh
* Allow random IP number allocation to peer.brian1997-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Abstract the CCP layer a level.brian1997-12-031-5/+5
| | | | Add DEFLATE support.
* Fix prototypes.brian1997-11-221-4/+10
| | | | | | | | | | | | | | 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-3/+3
| | | | | Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt()
* Abstract data read from and written to the tun device,brian1997-11-161-5/+6
| | | | | | | | | | | | | | allowing for a possible header on the front of all packets. In OpenBSD, there's a structure containing the address family here. If we're building under OpenBSD, set up the ``flags'' part of struct tuninfo (not there under FreeBSD) so that we config the interface as POINTOPOINT. Prefix prototypes with ``extern'' in os.c for consistency. These changes are cosmetic under FreeBSD, but allow ppp to build & work under OpenBSD (bar the srandomdev() stuff, the inclusing of <net/if_var.h> and some Makefile symantecs).
* Introduce ID0 logging.brian1997-11-091-2/+2
| | | | | | | | Stay as the invoking uid as much as possible. Execution as a normal user is still forbidden for now, so these changes are pretty ineffective. The next commit will implement the modifications suggested on -hackers a number of days ago.
* Cosmetic (no functional changes):brian1997-10-261-5/+5
| | | | | | | | | | | | | | | 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
* Test for the existence of ../../secure ratherbrian1997-09-281-2/+2
| | | | | | | 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
* Don't login twice when using passwdauthbrian1997-09-271-3/+3
| | | | | Suggested by: Peter Childs <pjchilds@imforei.apana.org.au> Merge the whole module into a few lines in pap.c
* Allow Microsoft CHAP authentication.brian1997-09-251-1/+8
| | | | | This is a combination of MD4 & DES. Submitted by: Gabor Kincses <gabor@acm.org>
* Install as group ``network''brian1997-09-041-2/+2
| | | | | | | | | | | 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"
* Make ppp owner root.ppp, mode 4550brian1997-08-311-2/+3
| | | | | Suggested by: guido Condoned by: eivind
* Add "set server" to control the server socket.brian1997-06-251-3/+3
| | | | | | | | | | 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-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | | | 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
* Use the latest alias engine - now in libalias.brian1997-05-231-8/+7
| | | | Submitted by: Charles Mott <cmott@srv.net>
* Remove the syslog stuff, and allow various return valuesbrian1997-03-311-2/+2
| | | | | | | | | 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
* Move uucplock into libutil and create a manual page.brian1997-03-301-4/+2
|
* Reviewed by: ache@freebsd.orgbrian1997-03-131-2/+2
| | | | | | | | 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.
* I remove pending signals completely, they are not useless, they areache1997-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dangerous! Signal handlers themself must be fixed to not call malloc, but no pended handlers, it will be correct fix. In finite case each signal handler can set some variable which will be analized later, but calling handler functions manually is too dangerous (f.e. signals not blocked while the handler or handlers switch executed in this case). Of course this code can be fixed instead of removing, but it not worth fixing in any case. Should go into 2.2 In addition sig.c code shows following dangerous fragments (there can be more, but I stop after two): This fragment if (fn == SIG_DFL || fn == SIG_IGN) { handler[sig-1] = (sig_type)0; <------------- here signal(sig,fn); } else { cause NULL pointer reference when signal comes "here", but more worse fragment is below: void handle_signals() { int sig; if (caused) for (sig=0; sig<__MAXSIG; sig++, caused>>=1) if (caused&1) (*handler[sig])(sig+1); } caused is bitmask which set corresponding bit on each signal coming. And now imagine, what happens when some signal comes (bit sets) while loop is executed (see caused>>=1 !!!) In this light carrier drop situation was (as gdb shows) 1. SIGSEGV in handle_signals because some junk called as *handler reference. 2. Since SIGSEGV was pended too (== never happens), it can cause various range of disasters.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Tidy up signal handling.brian1997-02-191-1/+1
| | | | | | | | | | | | | | | | | | All signal() calls have been changed to pending_signal() calls. pending_signal() is defined in the new sig.c file. It remembers the handler and traps the signal with a function that will remember the signal. main.c now calls handle_signals() to actually call the required handlers (if the above handler was called). If this doesn't close PR2662 (was PR2347), I'll cry. Joerg, I think this should go into 2.2, but I havn't done anything about it because I'm bound to botch it with the new sig.[ch] files. I've just "cvs add"'d sig.[ch] so far.... can you update to 2.2 and tell me what you did ? Thanks.
* 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.
OpenPOWER on IntegriCloud