summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ipcp.c
Commit message (Collapse)AuthorAgeFilesLines
* Log if fopen() fails.glebius2010-10-181-1/+4
| | | | Reviewed by: brian
* Conditionally add the interface name and address if availablebz2009-04-201-1/+1
| | | | | | | | | | so that a ppp running in `receiver' (server) mode can properly update routes, for example to update the MTU. Submitted by: loos.br gmail.com (Luiz Otavio O Souza) PR: bin/130159 PR: kern/125079, kern/122068, bin/126892 MFC after: 3 days
* Update to the "new" libalias API (and thus fix world breakage).piso2008-03-121-1/+3
|
* Add a radius_Flush() function that waits for the response (or timeout) tobrian2005-01-271-0/+1
| | | | | | | | | | | | | | any pending RADIUS transaction. Use this before sending RAD_STOP RADIUS messages so that we definitely ``stop'' the session. It was discovered that sometimes when the link timed out, we got lucky enough to have an un-ACK'd RADIUS accounting transaction in progress, resulting in the RAD_STOP message failing to send. Original report found on: A russion news group Text translated by: glebius Tested by: Alexey Popov llp at iteranet dot com MFC after: 7 days
* Integrate some OpenBSD alignment fixes. This hopefully also fixes PR 38058...brian2005-01-101-20/+28
| | | | Obtained from: Brad <brad@comstyle.com>
* Make ppp WARNS=5 cleanbrian2004-09-051-29/+19
|
* Support a ``set rad_alive N'' command to enable periodic RADIUS accountingbrian2004-07-171-3/+5
| | | | | | | | | | | information being sent to the RADIUS server. Logging of RADIUS accounting information moves to a ``set log [+-]radius'' level, along with the RADIUS alive info, and the version number is bumped to 3.2 to reflect this. Mostly submitted by: alx@sm.ukrtel.net (back in January) MFC after: 3 weeks
* Do RADIUS accounting on IPV6CP.ume2003-06-191-3/+3
| | | | MFC after: 1 week
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* If the peer gives us 0.0.0.0 as his IP number, NAK it rather than acceptingbrian2002-09-231-1/+2
| | | | | | | | | | | it as being in range. set ifaddr 1.2.3.4/0 5.6.7.8/0 no longer allows 0.0.0.0 as a valid IP. Reported/tested by: Bohdan Horst <nexus@hoth.amu.edu.pl> MFC after: 3 days
* 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-2/+2
|
* If a RAD_FILTER_ID is supplied by the RADIUS server, treat it as anbrian2002-06-121-0/+8
| | | | | | additional label from ppp.linkup & ppp.linkdown to load. Suggested and mostly submitted by: andrew pavlov <and@kremenchug.net>
* Make the way FSM options are processed easier to read by using structuresbrian2002-04-161-159/+142
| | | | | | | | | | | 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
* socket()s first argument should be a protocol family rather than anbrian2002-01-161-1/+1
| | | | address family.
* Specify the gateway address when updating the MTU and send/recv pipebrian2001-08-161-3/+10
| | | | | | | | | | sizes on a route. IMHO this shouldn't be necessary (the destination & mask/prefixlen should be enough), but without it, the default route update under OpenBSD will fail. Thanks to: Russell T Hunt <alaric@MIT.EDU>
* Add a missing newlinebrian2001-08-151-1/+1
|
* o Add ipv6 support, abstracting most NCP addresses into opaquebrian2001-08-141-325/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 sends a REQ without the IPADDR option, only reject itbrian2001-07-281-6/+15
| | | | | | | | | | once. If they repeat the request (again without the IPADDR option) ACK it. I've had reports that some ppp implementations will not assign themselves an IP number. This should negotiate with such things. MFC after: 3 days
* Convert IIJ copyrights to BSD copyrights.brian2001-06-131-20/+25
| | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp>
* If we don't receive a TY_IPADDR option as part of a configure request, NAKbrian2001-05-221-62/+80
| | | | as if we received one with 0.0.0.0 as the argument.
* Bring the interface IFF_UP from ipcp_InterfaceUp() (called from IPCP'sbrian2001-05-111-0/+7
| | | | | | | | TLU event handler). This used to be done as a side effect of SIOCAIFADDR'ing the interface, but now that duplicate SIOCAIFADDRs are optimised out, we can't depend on that behaviour.
* When we change the interface MTU, run through the routing table and tweakbrian2001-04-051-2/+2
| | | | all route MTUs too.
* MAXHOSTNAME includes space for a NULbrian2001-03-091-1/+1
|
* MAXPATHLEN -> PATH_MAXbrian2001-03-081-1/+1
| | | | | | Don't assume MAXHOSTNAMELEN includes the NUL Correct a diagnostic Use "localhost" in our prompt instead of ""
* Handle SECDNS being rejected when PRIDNS is notbrian2001-01-221-2/+5
| | | | | Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> PR: 24518
* Support radius accounting, and add a packet count to throughputbrian2000-08-281-0/+11
| | | | | | | | | statistics as a side effect. Submitted by: Marcin Cieslak <saper@system.pl> with some tweaks to RAD_ACCT_SESSION_ID and RAD_ACCT_MULTI_SESSION_ID generation by me.
* Don't delete sticky routes when unconfiguring the interface.brian2000-08-141-2/+0
| | | | Deleting all routes that match the interface is sufficient.
* Support link identification from rfc1570brian2000-07-191-1/+1
| | | | Two new commands are available; ``ident'' and ``sendident''.
* Allow ``set urgent none'' to disable all urgent ports and IPTOS_LOWDELAYbrian2000-06-081-1/+3
| | | | | | prioritisation. Requested by: luigi
* Fix a topy (if (expr); command;)brian2000-05-251-1/+1
| | | | Submitted by: Renaud Waldura <renaud@guppy.evolunet.com>
* Don't attempt to fputs(NULL, fp) when ``enable dns'' is given andbrian2000-05-241-2/+3
| | | | | there's no resolv.conf. Use a umask of 022 when creating resolv.conf, not 0644 !
* Add the ``resolv'' command for telling ppp how to deal with resolv.conf.brian2000-03-141-118/+221
| | | | | You can now ``resolv restore'' in ppp.linkdown ! Add DNS0 and DNS1 macros.
* Fix some printf-style argument bugsbrian2000-03-141-1/+2
|
* Introduce LOCALNAT and LOCALRAD defines so that the sources can staybrian2000-03-141-3/+4
| | | | | exactly the same in FreeBSD & OpenBSD despite libalias and libradius being local to the ppp sources under OpenBSD.
* When ppp can't identify the relevant name, don't use "???", usebrian2000-03-141-24/+23
| | | | <nnn> or <0xxxx> instead.
* Add a bunch of `const's and fix a typo.brian1999-12-271-3/+3
| | | | Submitted by: Rich Neswold <rneswold@MCS.Net>
* Cosmetic: Make struct mbuf more like kernel mbufs.brian1999-12-201-2/+2
|
* Back out the bogus #ifdef __NetBSD__ #include <signal.h> lines.brian1999-09-211-3/+0
| | | | | | | The original report was due to a mis-installation of the NetBS header files :-/ Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* NetBSD has moved ``extern int errno;'' to signal.h :-/brian1999-09-201-0/+3
| | | | Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* Introduce a forth IP packet queue. Urgent packets withbrian1999-09-071-43/+68
| | | | | | | | | ip_tos == IPTOS_LOWDELAY now get precidence over urgent packets with ip_tos != IPTOS_LOWDELAY and non-urgent packets with ip_tos == IPTOS_LOWDELAY. Enhance the ``set urgent'' syntax to allow for urgent UDP packets as well as urgent TCP packets.
* o Split the two IPCP queues into three - one for FSM databrian1999-09-041-1/+112
| | | | | | | | | | | | (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''.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* o Add the -foreground switch. This switch behaves like -background exceptbrian1999-08-191-4/+4
| | | | | | | | | 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''.
* o Obsolete the undocumented ``set weight'' command.brian1999-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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).
* Don't use static variables if we don't have to.brian1999-06-081-3/+2
|
* Don't IPCP TLD if we're already doing it. This preventsbrian1999-06-081-19/+23
| | | | | recursion by doing something like ``down'' or ``quit all'' in ppp.linkdown.
* o Alter the mbuf type as it's processed by different layers.brian1999-06-021-3/+5
| | | | | | | | 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().
* Remember if MYADDR or HISADDR is used in a filter add tweak allbrian1999-05-311-3/+6
| | | | filters any time either value changes.
* Deal with the fact that as we now mbuf_Read the fsmbrian1999-05-091-2/+2
| | | | | | | | | 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.
OpenPOWER on IntegriCloud