summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Do away with the ``err'' variable.brian2001-07-031-74/+117
| | | | Inspired by: kris
* Silence some of the -Wnon-const-format warnings and add __printflike()kris2001-07-021-6/+6
| | | | | | | to a function prototype which needs it. Approved by: brian MFC After: 2 weeks
* Add support for stateful MPPE (microsoft encryption) providingbrian2001-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
* Handle hardware-imposed MTU/MRU limitations. PPPoE will no longerbrian2001-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
* Convert IIJ copyrights to BSD copyrights.brian2001-06-131-17/+25
| | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp>
* When we change the interface MTU, run through the routing table and tweakbrian2001-04-051-2/+2
| | | | all route MTUs too.
* Untangle some cunfusion between the CLOSE_STAYDOWN, CLOSE_LCP andbrian2001-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.
* Only remove socket files with ``set server open''.brian2001-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.
* Allow ``set server closed'' to close the diagnostic socket.brian2001-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.
* Add ``enable/disable tcpmssfixup'', defaulting to enabled.brian2000-11-281-1/+3
| | | | | Suggested by: julian Hijacked from: ru (ports/net/tcpmssd)
* 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
|
OpenPOWER on IntegriCloud