summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
Commit message (Collapse)AuthorAgeFilesLines
* If the peer REJects our MRU request and that request is for a valuebrian2006-09-061-0/+3
| | | | less than the current MTU, set our mtu to the value requested.
* Integrate some OpenBSD alignment fixes. This hopefully also fixes PR 38058...brian2005-01-101-7/+7
| | | | Obtained from: Brad <brad@comstyle.com>
* Implement an ``enable/disable echo'' option, defaults to off.brian2004-12-131-0/+3
| | | | | | | | | This allows LCP ECHOs to be enabled independently of LQR reports. Note: This introduces a change in the default behaviour (search for lqr and echo in the man page). I'll update UPDATING to reflect this. PR: 74821
* Fix the build on 64-bit platforms.marcel2004-09-061-6/+10
|
* Make ppp WARNS=5 cleanbrian2004-09-051-16/+19
|
* Include the correct file (stdarg.h) and use va_list rather than _BSD_VA_LIST_brian2002-08-271-0/+1
| | | | Suggested by: mike
* Remove whitespace at the end of lines.brian2002-06-151-1/+1
|
* o Clean up some #includesbrian2002-05-141-1/+0
| | | | | | | | | | | | | | | | | | o Bump version number to 3.0.4 o When talking to a RADIUS server, provide a NAS-Port-Type. When the NAS-Port-Type is Ethernet, provide a NAS-Port value equal to the SESSIONID from the environment in direct mode or the NGM_PPPOE_SESSIONID message in other modes. If no SESSIONID is found, default to the interface index in client mode or zero in server mode. When the NAS-Port-Type is ISDN, set the NAS-Port to the minor number of the physical device (ie, the N in /dev/i4brbchN). This makes it easier for the RADIUS server to identify the client WRT accounting data etc. Prompted by: lsz8425 <lsz8425@mail.cd.hn.cn>
* Allow the peer to modify the LQR intervalbrian2002-05-011-0/+1
|
* Make the way FSM options are processed easier to read by using structuresbrian2002-04-161-347/+325
| | | | | | | | | | | instead of u_char *. The changes are cosmetic except: RecvConfigAck() now displays the options that are being ACK'd Huge (bogus) options sent from the peer won't cause an infinite loop SendIdent and ReceiveIdent are displayed consistenlty with other FSM data LCP AUTHPROTO options that aren't understood are NAK'd, not REJ'd
* Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's linebrian2002-03-301-9/+9
| | | | | | | | discipline to do the async escaping, but no other benefits are available yet. Change ``ifdef HAVE_DES'' to ``ifndef NODES'' for consistency. Make the Makefile a little more sane WRT RELEASE_CRUNCH.
* Add a ``log'' command for logging specific information.brian2001-11-031-1/+1
| | | | | | | | | | | | | | Add an ``UPTIME'' variable to indicate the bundle uptime. It's now possible to put something like this in ppp.linkdown for a server setup: MYADDR: log Session closing: User USER, address HISADDR, up UPTIME Fixed some memory leakage with commands that expand words. Made some functions static. Fixed a diagnostic bug (iface add .... SIOCDIFADDR)
* Fix AUTH callback negotiations.brian2001-10-181-2/+2
| | | | MFC after: 1 week
* When the peer fails to specify an MRU and a 1500 byte MRU is notbrian2001-10-181-4/+7
| | | | | | | | | | | | allowed either because of the transport or configuration, send a MRU NAK only once, then allow the negotiations to proceed. rfc1661 says that 1500 should always be allowed and rfc2516 says that 1492 is the maximum for PPPoE. This changes ppp so that it only weakly suggests 1492, then goes with the default (leaving the problem in the hands of the peer WRT how they set their MTU). MFC after: 1 week
* sigpause() -> sigsuspend()brian2001-09-131-1/+4
| | | | sigblock() -> sigprocmask()
* o Add ipv6 support, abstracting most NCP addresses into opaquebrian2001-08-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structures (well, they're treated as opaque). It's now possible to manage IPv6 interface addresses and routing table entries and to filter IPV6 traffic whether encapsulated or not. IPV6CP support is crude for now, and hasn't been tested against any other implementations. RADIUS and IPv6 are independent of eachother for now. ppp.linkup/ppp.linkdown aren't currently used by IPV6CP o Understand all protocols(5) in filter rules rather than only a select few. o Allow a mask specification for the ``delete'' command. It's now possible to specifically delete one of two conflicting routes. o When creating and deleting proxy arp entries, do it for all IPv4 interface addresses rather than doing it just for the ``current'' peer address. o When iface-alias isn't in effect, don't blow away manually (via ``iface add'') added interface addresses. o When listening on a tcp server (diagnostic) socket, bind so that a tcp46 socket is created -- allowing both IPv4 and IPv6 connections. o When displaying ICMP traffic, don't display the icmp type twice. When display traffic, display at least some information about unrecognised traffic. o Bump version Inspired after filtering work by: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
* If the peer REJects our MRU REQ, stop REQing it -- *EVEN* if we'rebrian2001-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | doing PPPoE and the default MRU is therefore too big. When negotiating with win2k, we ask for MRU 1492 and the win2k box NAKs us saying ``MRU 1492''. This doesn't make sense to me. When we continue to request MRU 1492, the win2k box eventually REJs our MRU. This fix allows negotiations to continue at that point, bringing the link up and potentially allowing the win2k box to send us frames that are too large. AFAICT this is better than failing to bring the link up.... probably ! I have no idea how to do the equivalent of ``route get'' or ``ifconfig -a'' under win2k, so I can't tell what MTU it actually ends up using. I believe the bug is in win2k (it's certainly mis-negotiating). I'll MFC given the release engineers permission as code freeze begins on August 1. PR: 29277 MFC after: 3 days
* Handle peer REQ/NAKs of >1500 byte MRUs when we have no preference.brian2001-07-261-11/+15
| | | | MFC after: 3 days
* Ignore (with a warning message) mtu/mru configurations that are greaterbrian2001-07-171-21/+37
| | | | | | than the maximum physical values. MFC after: 1 week
* Don't accept chap80lm by default - it doesn't work.brian2001-07-031-1/+1
| | | | MFC after: 1 week
* Handle hardware-imposed MTU/MRU limitations. PPPoE will no longerbrian2001-06-181-17/+62
| | | | | | | | | | | | allow MRU/MTU negotiations to exceed 1492. Add an optional ``max'' specifier to ``set m[rt]u'', ie. set mtu max 1480 Bump the ppp version number. Sponsored by: Monzoon Networks AG and FreeBSD Services Limited
* Convert IIJ copyrights to BSD copyrights.brian2001-06-131-17/+24
| | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp>
* Call MSCHAP CHAP80 in ``show lcp'' so that it's consistent with CHAP81.brian2000-11-291-1/+1
|
* Accept MSCHAPv2 by default.brian2000-11-191-1/+1
| | | | Enable and accept MPPE by default.
* Various whitespace changes.brian2000-10-301-1/+2
| | | | Make some functions static.
* Add MPPE and MSChap v2 support (denied and disabled by default)brian2000-10-301-5/+32
| | | | Submitted by: Ustimenko Semen <semen@iclub.nsu.ru>
* Support link identification from rfc1570brian2000-07-191-1/+39
| | | | Two new commands are available; ``ident'' and ``sendident''.
* Don't assign an MTU based on the peers first-link MRU in MP mode.brian2000-06-241-5/+4
| | | | Use the peers MRRU as we're supposed to.
* When ppp can't identify the relevant name, don't use "???", usebrian2000-03-141-33/+38
| | | | <nnn> or <0xxxx> instead.
* Add a bunch of `const's and fix a typo.brian1999-12-271-2/+2
| | | | Submitted by: Rich Neswold <rneswold@MCS.Net>
* Cosmetic: Make struct mbuf more like kernel mbufs.brian1999-12-201-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Silence a warning about uninitialized variables.brian1999-08-081-2/+2
|
* Initialise `mp'.brian1999-06-091-1/+2
|
* Allow our endpoint discriminator to be enabled, disabled, acceptedbrian1999-06-091-4/+7
| | | | | | and denied. This is necessary for some MP implementations that get confused if you accept their endpoint discriminator but reject their MRRU.
* o Alter the mbuf type as it's processed by different layers.brian1999-06-021-4/+7
| | | | | | | | o Show more information about missing MP fragments in ``show mp''. o Do away with mbuf_Log(). It was showing mbuf stats twice on receipt of LCP/CCP/IPCP packets.... ???!!? o Pre-allocate a bit extra when creating LQR packets to avoid having to allocate another mbuf in mbuf_Prepend().
* Deal with the fact that as we now mbuf_Read the fsmbrian1999-05-091-7/+3
| | | | | | | | | header in fsm_Input() we often end up with a NULL mbuf. Deal with a possible NULL mbuf being passed into mbuf_Prepend(). Adjust some spacing to make things more consistent.
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-5/+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''.
* Revert the ACCMAP changes where we OR the peers accmapbrian1999-04-111-35/+5
| | | | | | | | with our own if there are differing bits (last two revisions of lcp.c). This change broke at least one negotiation session. Instead, we just use an OR of the two accmap values when we're doing the ASYNC framing.
* If we adjust our required ACCMAP due to a more restrictivebrian1999-03-291-2/+18
| | | | | | ACCMAP being REQuested by the peer, also increment our FSM id so that we don't end up sending out a new REQ with the same ID and different data (the changed ACCMAP).
* When negotiating ACCMAPs, sync our ACCMAP with thebrian1999-03-011-5/+17
| | | | | | | | peers by ORing the two together and NAKing or REQing the result rather than allowing seperate local/peer values. If the peer REJs our ACCMAP and our ACCMAP isn't 0, warn about it and ignore the rejection.
* Allow control over the number of ConfigREQ & TermREQ attemptsbrian1999-02-261-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fully support both NT and LANMan CHAP type 0x80 as bothbrian1999-02-181-39/+96
| | | | authenticator and authenticatee.
* Initial RADIUS support (using libradius). See the man page forbrian1999-01-281-2/+5
| | | | | | | | | | | | | | | | | | | 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
* If we've configured CBCP *and* another not-so-importantbrian1999-01-121-2/+2
| | | | | | | CALLBACK protocol and end up agreeing CBCP, DTRT and go into CBCP phase rather than mistakenly terminating as if CBCP wasn't agreed. Problem reported by: Alexander Dubinin <alex@nstl.nnov.ru>
* Warn that the specific chap protocol isn't supported whenbrian1998-10-171-8/+19
| | | | | rejecting CHAP because of byte 5. Suggested by: Daniel O'Callaghan <danny@hilink.com.au>
* Initialise lcp::his_mru to the ``set mtu'' value if it's lessbrian1998-09-091-2/+4
| | | | | than DEF_MRU, allowing our interface mtu to be decreased despite negotiation with the peer.
* Don't cast potentially unaligned addresses to pointers tobrian1998-09-041-22/+23
| | | | | non-char types on non-i386 architectures. On Alpha and Sparc we get a bus error if we do.
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-8/+179
| | | | | | | | | | | | | | (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.
* o Fix remaining sizeof problems for 64 bit machines.brian1998-06-271-26/+27
| | | | | | | | | | o Allow ``set ....'' when we have multiple links but aren't in multilink mode. o Do a TLS when we receive a ``Open'' event in ``Closed'' state, despite the rfc state transition table. This is clearly an error in the RFC as TLS cannot have yet been called (without TLF) in the ``Closed'' state. I've posted a message to comp.protocols.ppp for confirmation.
OpenPOWER on IntegriCloud