summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
Commit message (Collapse)AuthorAgeFilesLines
* Handle the availability of TUNSIFHEAD. If it's there, use it.brian2000-01-234-29/+63
| | | | | For the moment this is just overhead, but it'll be used for INET6 support later.
* Use TUNSIFPID when we change our PID (if it exists).brian2000-01-213-1/+12
|
* Use AUTHLEN for the length of authnamebrian2000-01-171-1/+1
|
* Don't set ifaddr::in_addrs to 1 after an ``iface clear'' on an interfacebrian2000-01-071-5/+7
| | | | with no addresses.
* include stdlib.h (setproctitle() is prototyped there in OpenBSD)brian2000-01-071-0/+1
|
* Call serial devices ``cuaXX'' instead of ``cuaaX'' (in linebrian2000-01-072-2/+2
| | | | with OpenBSD conventions).
* .Bl -tag requires -width toobrian2000-01-072-2/+2
| | | | Obtained from: OpenBSD
* Remove an unused #definebrian2000-01-071-12/+0
|
* Ensure that there's a bit of extra space in our buffer when it'sbrian2000-01-033-2/+26
| | | | | | | passed to libalias. If there's not enough space, things like ftp PORT commands start failing.... Reported by: Gianmarco Giovannelli <gmarco@giovannelli.it>
* Increase M_MAXLEN from 2048 - sizeof struct mbuf tobrian1999-12-302-3/+3
| | | | | | | | 4096 - sizeof struct mbuf, and set MAX_MRU and MAX_MTU back to 2048. 2048 is big enough as an MTU/MRU, but we need to be able to allocate larger mbufs after reassembling IP fragments.
* Add a few missing #includesbrian1999-12-303-0/+3
|
* Correct usages of getuid() and geteuid()brian1999-12-306-7/+7
| | | | Pointed out by: billf
* Mention that it's only necessary to escape the '-' in chat scriptsbrian1999-12-293-2/+4
| | | | | | | twice (once for the arg parsing and once to make it a normal character). Make the man page example consistent. Reminded by: Bryan Liesner <bleez@netaxs.com>
* Add a bunch of `const's and fix a typo.brian1999-12-2716-26/+30
| | | | Submitted by: Rich Neswold <rneswold@MCS.Net>
* Don't allowt '#' as a comment when it's embedded in quotes:brian1999-12-277-33/+34
| | | | | | | | set something "xxx yyy # zzz" aaa shouldn't be interpreted as set something "xxx yyy" aaa
* Don't bother fork()ing after closing a ctty if ppp is about tobrian1999-12-231-0/+10
| | | | terminate anyway.
* Understand double-quotes anywhere on a command line in the samebrian1999-12-233-18/+14
| | | | | way that a shell does. The previous way ppp did it just didn't make any sense.
* Correct warning about unindented commands when the unindented commandbrian1999-12-231-27/+34
| | | | is actually a new label with a comment at the end of the line.
* Don't munge ``set dial|login|logout|hangup'' arguments beforebrian1999-12-227-17/+20
| | | | ExpandString() has a chance to do its own substitutions.
* Fix my '#'-at-end-of-lines change, spammed by a subsequent commit.brian1999-12-201-3/+10
|
* Use getpwuid()->pw_dir instead of $HOME when expanding ``~''.brian1999-12-201-10/+6
|
* Use getpwuid() instead of getlogin() in ``allow users''.brian1999-12-201-4/+5
|
* Add missing linefeed.brian1999-12-201-1/+1
|
* Cosmetic: clean up some parenthesis confusionbrian1999-12-201-10/+5
|
* Handle comments at the end of lines.brian1999-12-203-25/+44
|
* Notice and warn about unterminated quoted strings in commands.brian1999-12-2013-44/+100
| | | | The entire command is ignored if the syntax is invalid...
* Implement mbuf allocation internally by maintaining 8 buckets ofbrian1999-12-205-21/+82
| | | | | | | different sized mbufs, and mallocing them in chunks of 20 mbufs at a time. This improves back-to-back throughput by between 7 and 8%
* Cosmetic: Make struct mbuf more like kernel mbufs.brian1999-12-2030-519/+527
|
* Learn to do pointer arithmatic (doh!)brian1999-12-181-1/+1
|
* Handle PPPoPTY correctly.brian1999-12-131-2/+2
|
* Be careful not to re-initialise `struct stat' while it still hasbrian1999-12-033-26/+42
| | | | | | a running timer. This fixes a problem where a dial is manually aborted, the hangup script kicks in and the chat timer ends up on the timer queue twice (tick tick tick tick *boom*)
* Change the way we transfer links (again). The previousbrian1999-11-303-43/+88
| | | | | | | | | | | | | | | 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.
* depricated -> deprecated + mention the -alias flag status in README.changesbrian1999-11-292-4/+7
|
* Don't try to do a DIALOUT in -direct mode or if there's no phonebrian1999-11-281-5/+12
| | | | numbers set.
* Make -foreground a proper option (allowing ``allow mode foreground'',brian1999-11-286-11/+16
| | | | ``set mode foreground'' etc.
* Allow extended pap success messages by believing in the PAP headersbrian1999-11-261-4/+27
| | | | | | | | length field rather than the one byte message length field embedded in the packet. This steps slightly outside of the protocol boundaries, but should not cause any problems. Limitation noted by: Simon Winwood <simon@winwood.org>
* Change ``set cd'' so that its default value is device specific. Thebrian1999-11-2615-76/+173
| | | | | 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-2512-134/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't setuid() 'till we've called ID0setproctitle()brian1999-11-231-1/+1
|
* Call MkSockNode() as uid 0brian1999-11-213-1/+22
| | | | Forgotten by: julian
* Don't compile NETGRAPH out of ppp for the release crunchbrian1999-11-201-3/+3
|
* Update the time delta of the first item in TimerList beforebrian1999-11-191-1/+8
| | | | | | | | | inserting a new item. Without this, it's possible to mis-insert quite badly... but only by as much as the load of the first item, which is almost always 1 second. Initialise the timerservice with `restart' set if we're inserting at the start of the list.
* Fix ``set proctitle'' by using setproctitle().brian1999-11-176-20/+34
|
* Remove some extraneous ifdefs, and don't try to put the socket inbrian1999-11-161-21/+1
| | | | | O_NONBLOCK. The select() is the best best as I don't want to muck about with the send/receive thresholds.
* Use modfind() to check if a kld is already loaded.brian1999-11-164-24/+14
| | | | Submitted mostly by: green
* Don't insist on 4 digit umasks in ``set server''.brian1999-11-133-20/+12
| | | | Pointed out by: joerg
* Make the meaning of the provider part of the PPPoE device spec clearer.brian1999-11-132-8/+6
|
* Oops, netgraph.o -> ether.o for the RELEASE build.brian1999-11-111-2/+2
|
* If dev->connected is already set to CARRIER_OK in ether_AwaitCarrier,brian1999-11-091-1/+1
| | | | don't go and set it to CARRIER_LOST !
* Don't recurse into datalink_UpdateSet() afterbrian1999-11-092-4/+6
| | | | | | | | | | | doing a HangupDone(). The HangupDone() may fuel bundle_CleanDatalinks(), and if so, the bogus UpdateSet() ends up select()ing on a closed descriptor..... Change the main `do/while' loop to a `for' loop so that any `continue's do the bundle_CleanDatalinks() & bundle_IsDead() bit.
OpenPOWER on IntegriCloud