summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow authkey to be changed independently of the current phase.brian1999-08-221-14/+5
|
* o Add the -foreground switch. This switch behaves like -background exceptbrian1999-08-191-38/+38
| | | | | | | | | that ppp stays in the foreground. o Add the -quiet switch to quieten ppps startup o Add the -nat flag and discourage the use of the -alias flag. Both do the same thing. o Correct some nat usage strings. o Change the internal ``alias'' command to ``nat''.
* Implement a minimum idle time value as an optional second argumentbrian1999-08-171-5/+12
| | | | | | to ``set timeout''. This is useful for situations where your minimum call charge is (say) 5 minutes (like mine is)
* Set the close-on-exec flag for all unused descriptors whenbrian1999-08-171-7/+8
| | | | exec()ing other programs.
* o Obsolete the undocumented ``set weight'' command.brian1999-08-051-16/+39
| | | | | | | | | | | | | | | | | | | | | | | o If we're using RADIUS and the RADIUS mtu is less than our peers mru/mrru, reduce our mtu to this value for NetBSD too. o Make struct throughput's sample period dynamic and tweak the ppp version number to reflect the extra stuff being passed through the local domain socket as a result (MP mode). o Measure the current throughput based on the number of samples actually taken rather than on the full sample period. o Keep the throughput statisics persistent while being passed to another ppp invocation through the local domain socket. o When showing throughput statistics after the timer has stopped, use the stopped time for overall calculations, not the current time. Also show the stopped time and how long the current throughput has been sampled for. o Use time() consistently in throughput.c o Tighten up the ``show bundle'' output. o Introduce the ``set bandwidth'' command. o Rewrite the ``set autoload'' command. It now takes three arguments and works based on a rolling bundle throughput average compared against the theoretical bundle bandwidth over a given period (read: it's now functional).
* Mention that ospf is a possible filter protocol.brian1999-08-021-3/+3
|
* Support `igmp' filters.brian1999-06-231-4/+4
| | | | Mostly submitted by: Timo Geusch <freebsd@sleepycat.ukpeople.net>
* Allow reserved substitution strings to be escaped by preceeding thembrian1999-06-101-5/+7
| | | | with a backslash.
* Allow our endpoint discriminator to be enabled, disabled, acceptedbrian1999-06-091-10/+17
| | | | | | and denied. This is necessary for some MP implementations that get confused if you accept their endpoint discriminator but reject their MRRU.
* Use the correct pid when substituting PROCESSID.brian1999-06-091-9/+10
| | | | Problem reported by: Amedeo Beck Peccoz <gea@gressoney.it>
* Don't use static variables if we don't have to.brian1999-06-081-5/+9
|
* Correct the way ppp transfers links on the server side in MPbrian1999-06-051-3/+3
| | | | | | | | | mode by padding out the ``struct device'' to the maximum device size. Bump the ppp version number to indicate the transfer format change. This should make MP over tty and udp devices functional again.
* Mention physical and sync logging in the ``set log''brian1999-06-021-3/+3
| | | | usage message.
* Introduce the ``keep-session'' option. Refer to the manbrian1999-06-021-3/+5
| | | | | | page for details. This allows MP over non-tty devices where the original ppp process must not exit (such as sshd-spawned ppp sessions).
* Remember if MYADDR or HISADDR is used in a filter add tweak allbrian1999-05-311-2/+3
| | | | filters any time either value changes.
* Add ``show layers'' to see the protocol layering for a link.brian1999-05-151-2/+4
|
* Allow ``host:port/udp'' devices and support ``host:port/tcp'' asbrian1999-05-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-37/+43
| | | | | | | | | | | | | | | | | | | | | 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''.
* Add support for NetBSDbrian1999-04-261-5/+5
|
* Allow port ranges in ``alias port''.brian1999-03-251-4/+4
|
* Don't forget to fully initialise the configured valuesbrian1999-03-191-4/+4
| | | | | for MYADDR and HISADDR in ``set ifaddr'' so that unspecified values don't end up retaining their `width'.
* Support PPTP via libalias (``alias pptp addr'').brian1999-03-071-2/+4
|
* Support proxying & transparent proxying curtesy of libalias(3).brian1999-03-071-2/+4
| | | | | Order the alias command descriptions. Order the SEE ALSO entries.
* Extend the ``set redial'' command to allow incrementalbrian1999-03-041-3/+3
| | | | redial timeouts.
* Correct some ntohl/htonl bogons in the netmask handling.brian1999-03-031-3/+3
| | | | | | | | | This was pretty harmless as netmasks on a POINTOPOINT interface are pretty much ignored, but it looked funny. Mention the configured netmask in ``show ipcp''. Describe in more detail what a proxy arp entry is.
* Allow control over the number of ConfigREQ & TermREQ attemptsbrian1999-02-261-47/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that are made in each of the FSMs (LCP, CCP & IPCP) and the number of REQs/Challenges for PAP/CHAP by accepting more arguments in the ``set {c,ip,l}cpretry'' and ``set {ch,p}apretry'' commands. Change the non-convergence thresholds to 3 times the number of configured REQ tries (rather than the previous fixed ``10''). We now notice repeated NAKs and REJs rather than just REQs. Don't suggest that CHAP 0x05 isn't supported when it's not configured. Fix some bugs that expose themselves with smaller numbers of retries: o Handle instantaneous disconnects (set device /dev/null) correctly by stopping all fsm timers in fsm2initial. o Don't forget to uu_unlock() devices that are files but are not ttys (set device /dev/zero). Fix a *HORRENDOUS* bug in RFC1661 (already fixed for an Open event in state ``Closed''): According to the state transition table, a RCR+ or RCR- received in the ``Stopped'' state are supposed to InitRestartCounter, SendConfigReq and SendConfig{Ack,Nak}. However, in ``Stopped'', we haven't yet done a TLS (or the last thing we did is a TLF). We must therefore do the TLS at this point ! This was never noticed before because LCP and CCP used not use LayerStart() for anything interesting, and IPCP tends to go into Stopped then get a Down because of an LCP RTR rather than getting a RCR again.
* Parse IP addresses more securely - specifically, don't allowbrian1999-02-251-22/+7
| | | | | | | | a bum name to return as 0.0.0.0... we don't want ``delete xxx'' to delete the default route when xxx doesn't resolve. Support IP number specifications as the host when specifying a tcp-style device (rather than *just* hostnames).
* Fully support both NT and LANMan CHAP type 0x80 as bothbrian1999-02-181-17/+37
| | | | authenticator and authenticatee.
* Wait by default for one second after the login scriptbrian1999-02-161-3/+19
| | | | | | | | | | | | | | | | | is complete before checking carrier. If it's there, the device supports carrier. If it's not it doesn't. Add the ``set cd'' command for deciding how soon to check for carrier, and for deciding if carrier is REQUIRED. The default has changed: Pre 2.0 versions of ppp waited for 1 second. Version 2 didn't wait, but this causes problems with some (few?) modems that don't assert carrier immediately on reporting CONNECT. The one second delay is back now and can be removed with ``set cd 0''. Bump the ppp version number in case this needs to be changed again....
* When resending chap challenges, resend the same challengebrian1999-02-111-7/+7
| | | | | | | | | | | | | | | | | | | each time rather than making up a new one. Increase the authname/authkey max sizes to 100 characters. Allow ``authkey'' specifications beginning with ``!''. When a challenge is received, the text following the ``!'' is executed as a program (expanding stuff in the same way that ``sh'' and ``!bg'' do). The program is passed the peer name, peer challenge and local ``authname'' on standard input and is expected to output the name/key combination that should be used to build the CHAP response. This provides support for Secure ID cards (guess what I was given at work recently!) using CHAP. Examples will follow.
* Version 2.0 > 2.1 to reflection RADIUS additions.brian1999-01-281-3/+3
|
* Initial RADIUS support (using libradius). See the man page forbrian1999-01-281-14/+39
| | | | | | | | | | | | | | | | | | | 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
* Allow a variable as the first arg to ``set proctitle''.brian1998-12-141-7/+13
|
* Don't delete the primary interface address whenbrian1998-11-051-3/+4
| | | | | ``iface clean'' is used in auto mode while there are no active links.
* Allow multiple systems (config labels) on the commandbrian1998-10-311-22/+25
| | | | | | line and in the ``load'' & ``dial'' commands. The last label loaded becomes the current label name. Only require a label for -auto mode.
* Add ``set proctitle'' for changing argv[0]. All substitutionsbrian1998-10-271-2/+46
| | | | | | | are done in the same way as command execution. For example, ``set proctitle USER INTERFACE PROCESSID'' would be useful in a -direct profile for identifying who's connected.
* Add ``PROCESSID'' as a constant expanded when runningbrian1998-10-271-2/+5
| | | | commands.
* Shuffle the iface-alias option so that's in alphabeticalbrian1998-10-261-5/+5
| | | | order like the rest of the options.
* Add ``enable proxyall'' support. This adds proxy ARP entriesbrian1998-10-261-7/+25
| | | | | | | | | | for every machine on every class C or smaller subnet that we route to. Add ``set {send,recv}pipe'' for controlling our socket buffer sizes. Mention the IP number with the problem in a few error messages. All submitted by: Craig Leres <leres@ee.lbl.gov> Modified slightly by: me
* Fix the interface alias code. Previously, I was expecting somethingbrian1998-10-261-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like tun0: flags=blah 10.0.0.1 -> 10.0.0.100 10.0.0.2 -> 10.0.0.100 10.0.0.3 -> 10.0.0.100 to DTRT, despite the SIOCAIFADDR for each new alias returning -1 & EEXIST while adding the alias anyway. In real life, once we have the second alias with the same destination, nothing will route any more ! Also, because I was ignoring EEXIST, the dynamic IP assignment code was assigning duplicate addresses ('cos it was being lied to by iface_inAdd()). Now we have tun0: flags=blah 10.0.0.1 -> 255.255.255.255 10.0.0.2 -> 10.0.0.100 10.0.0.3 -> 255.255.255.255 This works - stuff bound to 10.1 & 10.3 will be considered alive by the kernel, and when they route back to the tun device, the packets get aliased to 10.2 and go out to 10.100 (as with the original plan). We still see the EEXIST in SIOCAIFADDR, but ignore it when our destination is 255.255.255.255, assuming that the alias *was* actually added. Additionally, ``iface add'' may now optionally be given only the interface address. The mask & destination default to 255.255.255.255.
* Loosen our restrictions on setting enddisc, mrru,brian1998-10-241-24/+54
| | | | | | | | shortseq, authname and authkey. o Auth{name,key} may additionally be set in PHASE_ESTABLISH. o The others may be set in PHASE_ESTABLISH as long as no links have yet reached DATALINK_LCP.
* Solve the ``first connection'' problem that occurs onbrian1998-10-221-97/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 :-)
* Move help displays left one column to avoid problems withbrian1998-10-171-3/+5
| | | | | | broken terminals that can't handle 80 columns followed by a linefeed. Pointed out by: bde@FreeBSD.org
* Sync with OpenBSD ifdefsbrian1998-09-171-5/+9
|
* Add the following word substitutions when running a shellbrian1998-08-291-3/+15
| | | | | | | | | command: AUTHNAME: The local authname ENDDISC: The local endpoint discriminator LABEL: The configuration label in use PEER_ENDDISC: The peers endpoint discriminator USER: The peers authname
* Allow the use of HISADDR, MYADDR and INTERFACE as wordsbrian1998-08-291-15/+78
| | | | | | | | embedded in the args of a "shell" or "!bg" command, and only accept upper case versions. We can now do: ! sh -c "ifconfig INTERFACE >/tmp/myfile"
* Mention ``cbcp'' in ``set log ?''brian1998-08-291-4/+4
|
* Fix some OpenBSD/alpha warningsbrian1998-08-261-3/+4
|
* Put the IP buffer queues into struct ipcp.brian1998-08-261-4/+4
| | | | Forgotten by: me
* If we've got a full output buffer queue and cannot sendbrian1998-08-251-2/+12
| | | | | | | | anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues. This should fix problems where ``ppp -auto'' seems to stop responding after failing to connect to the peer a few times.
OpenPOWER on IntegriCloud