aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/cbcp.c
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228990
* Be concerned about huge callback numbers by truncating them rather thanBrian Somers2005-02-151-5/+9
| | | | | | | | | scribbling past the end of our buffer. Problem spotted by: Damien COUDERC couderc at openbsd dot org Notes: svn path=/head/; revision=141948
* Fix the build on 64-bit platforms.Marcel Moolenaar2004-09-061-2/+2
| | | | Notes: svn path=/head/; revision=134833
* Make ppp WARNS=5 cleanBrian Somers2004-09-051-5/+5
| | | | Notes: svn path=/head/; revision=134789
* Remove whitespace at the end of lines.Brian Somers2002-06-151-1/+1
| | | | Notes: svn path=/head/; revision=98243
* Avoid a rather bizarre warning from gcc 3.1:Brian Somers2002-05-141-1/+1
| | | | | | | /usr/src/usr.sbin/ppp/cbcp.c:566:61: warning: trigraph ??! ignored Notes: svn path=/head/; revision=96584
* o Clean up some #includesBrian Somers2002-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=96582
* Support link identification from rfc1570Brian Somers2000-07-191-1/+1
| | | | | | | Two new commands are available; ``ident'' and ``sendident''. Notes: svn path=/head/; revision=63484
* When ppp can't identify the relevant name, don't use "???", useBrian Somers2000-03-141-2/+2
| | | | | | | <nnn> or <0xxxx> instead. Notes: svn path=/head/; revision=58034
* Add a bunch of `const's and fix a typo.Brian Somers1999-12-271-2/+2
| | | | | | | Submitted by: Rich Neswold <rneswold@MCS.Net> Notes: svn path=/head/; revision=55146
* Cosmetic: Make struct mbuf more like kernel mbufs.Brian Somers1999-12-201-10/+10
| | | | Notes: svn path=/head/; revision=54912
* o Split the two IPCP queues into three - one for FSM dataBrian Somers1999-09-041-1/+1
| | | | | | | | | | | | | | | (LCP/CCP/IPCP), one for urgent IP traffic and one for everything else. o Add the ``set urgent'' command for adjusting the list of urgent port numbers. The default urgent ports are 21, 22, 23, 513, 514, 543 and 544 (Ports 80 and 81 have been removed from the default priority list). o Increase the buffered packet threshold from 20 to 30. o Report the number of packets in the IP output queue and the list of urgent ports under ``show ipcp''. Notes: svn path=/head/; revision=50867
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* If we've negotiated CBCP and have also specified ``none'' as a possibleBrian Somers1999-07-271-5/+21
| | | | | | | | | | | callback option, and the server sends us CBCP_NONUM, proceed directly to the network phase rather than insisting on our configured CBCP option. Mostly submitted by: kkphang <phang@dgate.po.my> Notes: svn path=/head/; revision=49132
* o Alter the mbuf type as it's processed by different layers.Brian Somers1999-06-021-2/+3
| | | | | | | | | | | 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(). Notes: svn path=/head/; revision=47695
* o Redesign the layering mechanism and make the aliasing code part ofBrian Somers1999-05-081-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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''. Notes: svn path=/head/; revision=46686
* Ensure that the thing we're casting to struct ipBrian Somers1999-03-291-1/+2
| | | | | | | is aligned for non-i386 architectures. Notes: svn path=/head/; revision=45103
* Allow control over the number of ConfigREQ & TermREQ attemptsBrian Somers1999-02-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=44305
* Initial RADIUS support (using libradius). See the man page forBrian Somers1999-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=43313
* Send the peer-decided PSTN address with the CBCP Ack,Brian Somers1999-01-191-5/+18
| | | | | | | | | | otherwise windows clients will keep resending the response :-/ It'd be nice if M$ would document this sort of thing ! Problem reported by: Andrzej Tobola <san@tmp.iem.pw.edu.pl> Notes: svn path=/head/; revision=42842
* If the CBCP callee offsers no callback, send our configuredBrian Somers1998-10-311-5/+7
| | | | | | | | | response anyway. This is what Win95 does, despite it not being documented in the cbcp spec.... Reported by: Bill <petheram@acm.org> Notes: svn path=/head/; revision=40798
* Don't send a DELAY value when sending CBCP_NONUMBrian Somers1998-10-251-4/+8
| | | | | | | | (as per the spec). Spotted by: Andrzej Tobola <san@koziolek.lublin.top.pl> Notes: svn path=/head/; revision=40655
* Warn about (but process anyway) CBCP messages with an incorrect id.Brian Somers1998-10-171-1/+11
| | | | Notes: svn path=/head/; revision=40486
* Adjust our CBCP RESP id so that it's the same as the REQ.Brian Somers1998-10-171-1/+2
| | | | | | | Submitted by: Tom <root@majestix.cmr.no> Notes: svn path=/head/; revision=40485
* If the client asks for CBCP, then replies with CBCP_NONUMBrian Somers1998-10-171-1/+8
| | | | | | | | | to our REQ, allow no dialback - but only if we've ``set cbcp *''.. Suggested by: Andrzej Tobola <san@koziolek.lublin.top.pl> Notes: svn path=/head/; revision=40484
* Remove redundant include file.Brian Somers1998-08-261-2/+1
| | | | Notes: svn path=/head/; revision=38558
* Missed these...Brian Somers1998-08-071-0/+692
Notes: svn path=/head/; revision=38175