aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak -DNOINET6Brian Somers2002-09-021-0/+2
| | | | | | | | Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> MFC after: 1 day Notes: svn path=/head/; revision=102855
* - made ppp compliant to RFC 2472 (based on a patch from anotherBrian Somers2002-08-291-0/+10
| | | | | | | | | | | | contributor) - support ipv6cpretry and ipv6cpretries, which are IPv6 versions of ipcpretry and ipcpretries. - improve handling of IPv6 link-local addresses Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> Notes: svn path=/head/; revision=102558
* Include the correct file (stdarg.h) and use va_list rather than _BSD_VA_LIST_Brian Somers2002-08-271-0/+1
| | | | | | | Suggested by: mike Notes: svn path=/head/; revision=102500
* Remove whitespace at the end of lines.Brian Somers2002-06-151-13/+13
| | | | Notes: svn path=/head/; revision=98243
* Bump the version number to reflect the recent RADIUS commitsBrian Somers2002-06-121-1/+1
| | | | Notes: svn path=/head/; revision=98150
* Coerce pid_t to long rather than int for better portability.Brian Somers2002-05-271-7/+7
| | | | | | | Suggested by: Theo de Raadt <deraadt@openbsd.org> Notes: svn path=/head/; revision=97360
* Handle MS-CHAPv2 authentication correctly via the RADIUS server (if it'sBrian Somers2002-05-161-1/+1
| | | | | | | | | | | | | configured). Handle internal failures in radius_Authenticate() correctly. Bump the ppp version number. This doesn't yet work with MPPE. More will follow. Sponsored by: Mozoon Notes: svn path=/head/; revision=96730
* o Clean up some #includesBrian Somers2002-05-141-2/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Make ``set mru'' require a context. In multi-link mode, there's noBrian Somers2002-05-041-1/+1
| | | | | | | | | | point in being allowed to ``set mru'' for the MP lcp layer. Spotted by: Richard Browne <richb@timestone.com.au> MFC after: 1 month Notes: svn path=/head/; revision=96038
* Bump the version to mark the fixed FSM TLD orderingBrian Somers2002-05-011-1/+1
| | | | Notes: svn path=/head/; revision=95873
* Usage style sweep: spell "usage" with a small 'u'.Dag-Erling Smørgrav2002-04-221-2/+2
| | | | | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/. Notes: svn path=/head/; revision=95258
* Add variable substitutions for SOCKNAME, IPOCTETSIN, IPOCTETSOUT, IPPACKETSIN,Brian Somers2002-04-171-28/+94
| | | | | | | | IPPACKETSOUT, IPV6OCTETSIN, IPV6OCTETSOUT, IPV6PACKETSIN, IPV6PACKETSOUT, OCTETSIN, OCTETSOUT, PACKETSIN, PACKETSOUT and SOCKNAME. Notes: svn path=/head/; revision=94934
* Make the way FSM options are processed easier to read by using structuresBrian Somers2002-04-161-1/+1
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=94894
* Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's lineBrian Somers2002-03-301-4/+4
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=93418
* Expand the first argument of the ``log'' command if it's a variable.Brian Somers2001-11-221-1/+1
| | | | Notes: svn path=/head/; revision=86760
* Remove unused variablesBrian Somers2001-11-041-5/+2
| | | | Notes: svn path=/head/; revision=86028
* Add a ``log'' command for logging specific information.Brian Somers2001-11-031-35/+51
| | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=85991
* Don't avoid setting a 0 second timer in datalink_StartDialTimer() byBrian Somers2001-10-231-1/+1
| | | | | | | | | | | | | | | | not setting any timer. Instead, set a 1 millisecond timer. This ensures that ppp will come out of it's select() call after losing carrier in -ddial mode with a reconnect period of 0 and going to ST_OPENING, rather than waiting indefinitely for some other event to wake ppp up. Bump the ppp version number to indicate the event. MFC after: 3 days Notes: svn path=/head/; revision=85362
* Handle snprintf() returning < 0 (not just -1)Brian Somers2001-08-201-1/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=81982
* Better handling for the return of snprintf().Brian Somers2001-08-181-5/+8
| | | | Notes: svn path=/head/; revision=81902
* Back out the previous fix to deal with kernels that don't support IPv6,Brian Somers2001-08-181-20/+9
| | | | | | | | | | | | | | | | | | and implement a far more subtle and correct fix. The reason behind the infinite loop was that ppp was trying to make up initial IPv6 numbers and wasn't giving up when it failed unexpectedly to assign the addresses it just fabricated to it's interface (thinking that the reason was because another interface was using the same address). It now attempts this up to 100 times before just failing and trying to muddle along (in reality, this should never happen more than a couple of times unless our random number generator doesn't work). Also, when IPv6 is not available, don't even try to assign the IPv6 interface address in the first place... Notes: svn path=/head/; revision=81897
* Run correctly on a machine built without AF_INET6 supportBrian Somers2001-08-181-9/+20
| | | | Notes: svn path=/head/; revision=81888
* Build properly with -DNOIPV6Brian Somers2001-08-181-0/+2
| | | | Notes: svn path=/head/; revision=81885
* Remove an unused variableBrian Somers2001-08-161-1/+0
| | | | Notes: svn path=/head/; revision=81784
* Probe for the availability of AF_INET6 at startup. If it's notBrian Somers2001-08-151-1/+8
| | | | | | | | available, default ipv6cp to disabled and refuse to let the user enable it. Notes: svn path=/head/; revision=81697
* o Add ipv6 support, abstracting most NCP addresses into opaqueBrian Somers2001-08-141-120/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=81634
* Add a ``nat punch_fw'' command for punching FTP and IRC DCC holes throughBrian Somers2001-08-021-0/+4
| | | | | | | the firewall. Notes: svn path=/head/; revision=81033
* Handle peer REQ/NAKs of >1500 byte MRUs when we have no preference.Brian Somers2001-07-261-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=80385
* Fix the type of the last arg to execl()Brian Somers2001-07-091-1/+1
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=79450
* Add a ``nat proto'' command -- similar to natd(8)'s -redirect_proto switch.Brian Somers2001-07-091-0/+2
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=79433
* Spell stateful properlyBrian Somers2001-07-061-2/+2
| | | | | | | | Inconsistently done by: brian Spotted by: ru Notes: svn path=/head/; revision=79370
* Silence some gcc warningsBrian Somers2001-07-031-0/+4
| | | | Notes: svn path=/head/; revision=79163
* Do away with the ``err'' variable.Brian Somers2001-07-031-74/+117
| | | | | | | Inspired by: kris Notes: svn path=/head/; revision=79119
* Silence some of the -Wnon-const-format warnings and add __printflike()Kris Kennaway2001-07-021-6/+6
| | | | | | | | | | to a function prototype which needs it. Approved by: brian MFC After: 2 weeks Notes: svn path=/head/; revision=79087
* Add support for stateful MPPE (microsoft encryption) providingBrian Somers2001-06-181-15/+38
| | | | | | | | | | | | | | | | | | encryption compatibility with Windows 2000. Stateful encryption uses less CPU but is bad on lossy transports. The ``set mppe'' command has been expanded. If it's used with any arguments, ppp will insist on encryption, closing LCP if the other end refuses. Unfortunately, Microsoft have abused the CCP reset request so that receiving a reset request does not result in a reset ack when using MPPE... Sponsored by: Monzoon Networks AG and FreeBSD Services Limited Notes: svn path=/head/; revision=78411
* Handle hardware-imposed MTU/MRU limitations. PPPoE will no longerBrian Somers2001-06-181-9/+68
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=78410
* Convert IIJ copyrights to BSD copyrights.Brian Somers2001-06-131-17/+25
| | | | | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp> Notes: svn path=/head/; revision=78189
* When we change the interface MTU, run through the routing table and tweakBrian Somers2001-04-051-2/+2
| | | | | | | all route MTUs too. Notes: svn path=/head/; revision=75212
* Untangle some cunfusion between the CLOSE_STAYDOWN, CLOSE_LCP andBrian Somers2001-02-041-1/+1
| | | | | | | | | | | CLOSE_NORMAL meanings. CLOSE_NORMAL doesn't change the currently required state, the others do. This should stop ppp from entering DATALINK_READY when LCP shutdown doesn't end up happening cleanly. Bump our version number to reflect this change. Notes: svn path=/head/; revision=71970
* Only remove socket files with ``set server open''.Brian Somers2001-01-291-3/+5
| | | | | | | | | | Only show the mask in ``show bundle'' when it's been specified. Complain about unexpected arguments after ``set server {none,open,closed}'' Log re-open failures as warnings rather than phase messages. Fix some markup for the ``set server'' man page description. Notes: svn path=/head/; revision=71764
* Allow ``set server closed'' to close the diagnostic socket.Brian Somers2001-01-261-5/+26
| | | | | | | | | | | | Allow ``set server open'' to re-open the diagnostic socket. Handle SIGUSR1 by re-opening the diagnostic socket When receiving SIGUSR2 (and in ``set server none''), don't forget the socket details so that ``set server open'' and SIGUSR1 open it again. Don't create the diagnostic socket as uid 0 ! It's far to dangerous. Notes: svn path=/head/; revision=71657
* Add ``enable/disable tcpmssfixup'', defaulting to enabled.Brian Somers2000-11-281-1/+3
| | | | | | | | Suggested by: julian Hijacked from: ru (ports/net/tcpmssd) Notes: svn path=/head/; revision=69303
* Add ``all'' logging.Brian Somers2000-10-301-1/+1
| | | | | | | Submitted by: eivind Notes: svn path=/head/; revision=67916
* Bump our version to reflect the recent MPPE additions (and ccp structBrian Somers2000-10-301-1/+1
| | | | | | | size change). Notes: svn path=/head/; revision=67915
* Add MPPE and MSChap v2 support (denied and disabled by default)Brian Somers2000-10-301-0/+40
| | | | | | | Submitted by: Ustimenko Semen <semen@iclub.nsu.ru> Notes: svn path=/head/; revision=67910
* Spelling policeBrian Somers2000-09-061-2/+2
| | | | | | | Submitted by: des Notes: svn path=/head/; revision=65550
* Complain about invalid arguments passed to ``set ifaddr''Brian Somers2000-08-301-2/+14
| | | | Notes: svn path=/head/; revision=65263
* Make -DNOSUID (or -DPPP_NOSUID) possible to build ppp without SUIDBrian Somers2000-08-181-0/+2
| | | | | | | capabilities. Notes: svn path=/head/; revision=64802
* Warn that the ``alias'' command is depricated.Brian Somers2000-08-181-0/+10
| | | | | | | We still process it for now though. Notes: svn path=/head/; revision=64801
* setproctitle() doesn't need to be called with root privs, so moveBrian Somers2000-08-161-7/+2
| | | | | | | it from id.c into defs.c Notes: svn path=/head/; revision=64698