summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
Commit message (Collapse)AuthorAgeFilesLines
* Add ``all'' logging.brian2000-10-301-1/+1
| | | | Submitted by: eivind
* Bump our version to reflect the recent MPPE additions (and ccp structbrian2000-10-301-1/+1
| | | | size change).
* Add MPPE and MSChap v2 support (denied and disabled by default)brian2000-10-301-0/+40
| | | | Submitted by: Ustimenko Semen <semen@iclub.nsu.ru>
* Spelling policebrian2000-09-061-2/+2
| | | | Submitted by: des
* Complain about invalid arguments passed to ``set ifaddr''brian2000-08-301-2/+14
|
* Make -DNOSUID (or -DPPP_NOSUID) possible to build ppp without SUIDbrian2000-08-181-0/+2
| | | | capabilities.
* Warn that the ``alias'' command is depricated.brian2000-08-181-0/+10
| | | | We still process it for now though.
* setproctitle() doesn't need to be called with root privs, so movebrian2000-08-161-7/+2
| | | | it from id.c into defs.c
* Maintain input and output throughput averages and choose the highestbrian2000-08-151-1/+1
| | | | | | | | | | | | | | of the two when calculating the MP throughput average for the ``set autoload'' implementation. This makes more sense as all links I know of are full-duplex. This also means that people may need to adjust their autoload settings as 100% bandwidth is now the theoretical maximum rather than 200% (but of course, halfing the current settings is probably not the correct answer either!). This involves a ppp version bump as we need to pass an extra throughput array through the MP local domain socket.
* Calculate the average link throughput using a counter based on thebrian2000-08-151-1/+1
| | | | | | | | cumulative total of all active links rather than basing it on the total of PROTO_MP traffic. This fixes a problem whereby Cisco routers send PROTO_IP packets only when there's only one link (hmm, what a good idea!).
* Support link identification from rfc1570brian2000-07-191-1/+32
| | | | Two new commands are available; ``ident'' and ``sendident''.
* o Log the (payload/size) of all packet types, not just TCP packetsbrian2000-07-071-2/+5
| | | | | | | | | | | | | | | | | | | o If the new ``filter-decapsulation'' is enabled, delve into UDP packets that contain 0xff 0x03 as the first two bytes, and if we recognise it as PROTO_IP, decapsulate it for the purpose of filter checking. If we recognise it as PROTO_<anything else> mention this for logging purposes only. This change is aimed at people running PPPoUDP where the UDP traffic is being sent over another PPP link. It's desireable to have the top level link connected all the time, but to have the bottom level link capable of decapsulating the traffic and comparing the payload against the filters, thus allowing ``set filter dial ...'' to work in tunnelled environments. The caveat here is that the top ppp cannot employ any compression layers without making the data unreadable for the bottom ppp. ``disable deflate pred1 vj'' and ``deny deflate pred1 vj'' is suggested.
* Remove ``nat pptp'' as this is now done transparently by libalias.brian2000-06-201-1/+0
|
* Add ``set ifqueue'' to control the size of the outgoing packetbrian2000-06-111-0/+8
| | | | | | | queue. Doing ``set ifqueue 0'' and ``set urgent none'' will allow full use of luigi's WF2Q code. Requested by: luigi
* Allow ``set urgent none'' to disable all urgent ports and IPTOS_LOWDELAYbrian2000-06-081-0/+8
| | | | | | prioritisation. Requested by: luigi
* Allow authname to be changed at any phase, just emit a warningbrian2000-03-311-4/+4
| | | | if it's not DEAD or ESTABLISH
* Add the ``nat target'' command.brian2000-03-311-15/+16
|
* Understand environment variables in commandsbrian2000-03-141-1/+13
| | | | Submitted by: Mark Knight <markk@knigma.org>
* Add the ``resolv'' command for telling ppp how to deal with resolv.conf.brian2000-03-141-8/+58
| | | | | You can now ``resolv restore'' in ppp.linkdown ! Add DNS0 and DNS1 macros.
* 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.
* Add ``set log dns'' to log DNS QUERY packets.brian2000-03-141-2/+2
| | | | | | | | | | | | | This is invaluable for dial-on-demand connections... In ppp.linkup: set log -dns -tcp/ip and in ppp.linkdown set log +dns +tcp/ip giving a much better account of why the link came up.
* Correct usages of getuid() and geteuid()brian1999-12-301-1/+1
| | | | Pointed out by: billf
* Don't allowt '#' as a comment when it's embedded in quotes:brian1999-12-271-1/+1
| | | | | | | | set something "xxx yyy # zzz" aaa shouldn't be interpreted as set something "xxx yyy" aaa
* Don't munge ``set dial|login|logout|hangup'' arguments beforebrian1999-12-221-1/+1
| | | | ExpandString() has a chance to do its own substitutions.
* Add missing linefeed.brian1999-12-201-1/+1
|
* Notice and warn about unterminated quoted strings in commands.brian1999-12-201-2/+5
| | | | The entire command is ignored if the syntax is invalid...
* Change the way we transfer links (again). The previousbrian1999-11-301-1/+1
| | | | | | | | | | | | | | | method avoided all race conditions, but suffered from sometimes running out of buffer space if enough clients were piled up at the same time. Now, the client pushes the link descriptor, one end of a socketpair() and the ppp version via sendmsg() at the server. The server replies with a pid. The client then transfers any link lock with uu_lock_txfr() and writev()s the actual link contents. The socketpair is now the only place we need to have large socket buffers and the bind()ed socket can keep the default 4k buffer while still handling around 90 racing clients.
* Change ``set cd'' so that its default value is device specific. Thebrian1999-11-261-2/+2
| | | | | default is still 1 second for ttys, but is now 6 seconds for i4b (ISDN) devices and 5 seconds for ethernet (PPPoE) devices.
* Rewrite the link descriptor transfer code in MP mode.brian1999-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ppp attempted to bind() to a local domain tcp socket based on the peer authname & enddisc. If it succeeded, it listen()ed and became MP server. If it failed, it connect()ed and became MP client. The server then select()ed on the descriptor, accept()ed it and wrote its pid to it then read the link data & link file descriptor, and finally sent an ack (``!''). The client would read() the server pid, transfer the link lock to that pid, send the link data & descriptor and read the ack. It would then close the descriptor and clean up. There was a race between the bind() and listen() where someone could attempt to connect() and fail. This change removes the race. Now ppp makes the RCVBUF big enough on a socket descriptor and attempts to bind() to a local domain *udp* socket (same name as before). If it succeeds, it becomes MP server. If it fails, it sets the SNDBUF and connect()s, becoming MP client. The server select()s on the descriptor and recvmsg()s the message, insisting on at least two descriptors (plus the link data). It uses the second descriptor to write() its pid then read()s an ack (``!''). The client creates a socketpair() and sendmsg()s the link data, link descriptor and one of the socketpair descriptors. It then read()s the server pid from the other socketpair descriptor, transfers any locks and write()s an ack. Now, there can be no race, and a connect() failure indicates a stale socket file. This also fixes MP ppp over ethernet, where the struct msghdr was being misconstructed when transferring the control socket descriptor. Also, if we fail to send the link, don't hang around in a ``session owner'' state, just do the setsid() and fork() if it's required to disown a tty. UDP idea suggested by: Chris Bennet from Mindspring at FreeBSDCon
* Fix ``set proctitle'' by using setproctitle().brian1999-11-171-4/+8
|
* Don't insist on 4 digit umasks in ``set server''.brian1999-11-131-12/+10
| | | | Pointed out by: joerg
* Support PPPoEbrian1999-11-061-1/+1
| | | | | Help (lots) from: julian, archie Facilities from: ahebert@pubnix.net
* Introduce ``set logout''; another chat script. This is in preparationbrian1999-10-251-0/+8
| | | | for the abstraction of ``set dial'' and ``set hangup''.
* Support ``set cd off'' to tell ppp not to even look for carrier on thebrian1999-09-261-6/+10
| | | | device.
* 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>
* Cosmetic:brian1999-09-081-1/+1
| | | | alias_cmd -> nat_cmd after a repo-copy
* Introduce a forth IP packet queue. Urgent packets withbrian1999-09-071-15/+37
| | | | | | | | | 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.
* $FreeBSD$ -> __DATE__brian1999-09-061-2/+1
| | | | This is probably more appropriate that $Date$ anyway
* $Date$ -> $FreeBSD$peter1999-09-061-1/+1
|
* o Split the two IPCP queues into three - one for FSM databrian1999-09-041-3/+21
| | | | | | | | | | | | (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-2/+2
|
* 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.
OpenPOWER on IntegriCloud