summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
Commit message (Collapse)AuthorAgeFilesLines
* o Fix a few comment typos.brian1998-03-125-49/+71
| | | | | | | | | | | | | | | | | o Fix ``set timeout'' usage message and documentation. o Change ifOutPackets, ifOutOctets and ifOutLQRs to `u_int32_t's so that they wrap correctly. o Put the LQR in network byte order using the correct struct size (sizeof u_int32_t, not sizeof u_long). o Wrap LQR ECHO counters correctly. o Don't increment OutLQR count if the last LQR hasn't been replied to. o Initialise HisLqrData (last received LQR) in StartLqm. o Don't start the LQR timer if we're `disabled' and `accepted'. o Generate LQR responses when both sides are using a timer and we're not going to send our next LQR before the peers max timeout. LQR should now be fully functional.
* Explicitly call `caused' an `int'.brian1998-03-081-2/+2
| | | | Sugested by: gcc-2.8
* Use the correct device name in -direct mode.brian1998-03-061-16/+12
|
* MFMP: Allow 8 character login names.brian1998-02-195-27/+57
| | | | Do the login()/logwtmp()/logout() as id 0.
* MFMP: LogWARN rather than LogERROR when we can't createbrian1998-02-181-5/+5
| | | | our diagnostic socket.
* Don't leak memory when the peer sends PROTO_COMPD packetsbrian1998-02-181-2/+2
| | | | without negotiating compression first.
* Move handle_signals() to before the FD_SETs. handle_signals()brian1998-02-101-3/+6
| | | | | | may result in a our modem closing after it's made its way into the fd_set, resulting in a program exit (with select(): bad file descriptor) rather than a dropped link.
* Merge from MP branch:brian1998-02-041-2/+2
| | | | Correct magic number format string
* Don't moan about not creating tunX.pid and ttyX.if if RELEASE_CRUNCHbrian1998-01-293-5/+19
| | | | is defined.
* Talk a bit about ongoing development.brian1998-01-291-0/+22
|
* Cosmetic:brian1998-01-274-35/+22
| | | | | | | | | | Don't mention the authors name at startup. He's already credited in the man page. Instead, make the message consistent with the one given to the diagnostic port (and fix the grammar when entering `term' mode). Don't credit the zlib author in the man page as ppp isn't linked directly with zlib (it's shared). Mention when the OpenBSD port was first made available.
* Fix error message.brian1998-01-241-10/+5
| | | | | Don't complicate the test compilation mentioned at the start of the file.
* Stop bogus warnings.brian1998-01-231-1/+2
|
* Re-implement the proxy arp sockaddr_dl search routine (again).brian1998-01-231-65/+80
| | | | It now works :-) and searches all interface aliases.
* Don't allow manual dialing unless in auto or interactive mode.brian1998-01-231-1/+7
|
* Use the sockaddr_dl with the link#, not the ethernet addressbrian1998-01-211-2/+2
| | | | when creating proxy arp entries.
* Remove unused #includes.brian1998-01-2135-138/+69
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Allow an optional delay when specifying "set openmode active".brian1998-01-2013-62/+110
| | | | | | | | | | | | | | | | The delay defaults to 1 sec (as it always has) unless we've done a ~p in interactive mode or we've actually detected a HDLC frame. This is now cleanly implemented (via async timers) so that it is possible for LCP to come up despite the delay if an LCP REQ is received. This will hopefully solve situations with slow servers or slirp scenarios (where ECHO is left on the port for a second or so before the peer enters packet mode). Also, ~p in interactive mode no longer changes the value of the default openmode delay and -dedicated mode enters packet mode in the right state according to the value of openmode.
* dlopen(..., RTLD_NOW) rather than RTLD_LAZY.brian1998-01-191-3/+7
| | | | Pointed out by: John Polstra <jdp@polstra.com>
* sys/types.h -> sys/param.hbrian1998-01-191-2/+2
| | | | Pointed out by: Niklas Hallqvist <niklas@petra.appli.se>
* Reimplement proxy-arp address stuff using sysctl().brian1998-01-195-93/+127
|
* Allow "set vj" for changing the default number of slotsbrian1998-01-185-32/+120
| | | | | | and whether slot compression is requested. Don't show current values with "show ipcp" if IPCP isn't "opened".
* Remove the necessity of -ldes and -lalias etc from release/Makefile.brian1998-01-171-3/+12
| | | | | | | | | | When building a release, RELEASE_CRUNCH is defined for a `make' of the objects required by the crunch of each program. The object list is still obtained in the same way, so you must make sure that all objects are built (empty if necessary) by this make. ppp/Makefile provides an example. Reviewed by: jkh
* Free our input mbuf when the FCS is good (oops, memory leak).brian1998-01-141-1/+2
|
* Lose __libalias_version.brian1998-01-141-10/+59
| | | | We now look for the biggest of libalias.so.2.*
* Lose <net/if_var.h> !brian1998-01-115-20/+5
| | | | This'll require a `make installworld'.
* Make things work when sizeof(long) != 32 (hopefully)brian1998-01-1110-86/+89
|
* Remember any number of interface names.brian1998-01-111-13/+28
|
* Remove includes of if_var.h and in_var.hbrian1998-01-111-5/+1
|
* Allow 6 byte interface names (for >tun99)brian1998-01-111-2/+2
|
* Pause according to the redial setting when dialing manually.brian1998-01-101-1/+6
| | | | Pointed out by: Berend de Boer <berend@compuserve.com>
* Implement Reset{Req,Ack} properly, as per rfc 1962.brian1998-01-109-42/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (I completely mis-read the rfc last time 'round!) This means: o Better CCP/WARN Reset diagnostics. o After we've sent a REQ and before we've received an ACK, we drop incoming compressed data and send another REQ. o Before sending an ACK, re-sequence all pending PRI_NORMAL data in the modem queue so that pending packets won't get to the peer *after* the ResetAck. o Send ACKs with the `identifier' from the REQ frame. o After we've received a correct ACK, duplicate ACKs are ok (and will reset our history). o Incorrect ACKs (not matching the last REQ) are moaned about and dropped. Also, o Calculate the correct FCS after compressing a packet. DEFLATE *may* produce an mbuf with more than a single link in the chain, but HdlcOutput didn't know how to calculate the FCS :-( o Make `struct fsm'::reqid a u_char, not an int. This fix will prevent us from sending id `255' 2,000,000,000 times before wrapping to `0' for another 2,000,000,000 sends :-/ o Bump the version number a little. The end result: DEFLATE now works over an unreliable link layer. I can txfr a 1.5Mb kernel over a (rather bad) null-modem cable at an average of 21679 bytes per second using rcp. Repeat after me: Don't test compression using a loopback ppp/tcp setup as we never lose packets and therefore never have to reset!
* Zap any addresses on the network side of the `tun' as soonbrian1998-01-083-3/+40
| | | | as we've successfully opened the /dev side.
* Correct the return value of ReportProtStatus() ("show proto").brian1998-01-061-2/+2
| | | | Submitted by: Dave Bodenstab <imdave@mcs.net>
* o Allow the use of HISADDR as the first arg to "add".brian1998-01-056-120/+311
| | | | | | | | | | | | | | o Allow a forth argument in ppp.secret, specifying a new label. This gives control over which section of ppp.link{up,down} is used based on the authenticated user. o Support random address ranges in ppp.secret (not just in ppp.conf). o Add a AUTHENTICATING INCOMING CONNECTIONS section to the man page. o Add a bit more about DEFLATE in the man page. o Fix the incorrect "you must specify a password in interactive mode" bit of the manual. o Space things in the man page consistently. o Be more precice about where you can use MYADDR, HISADDR and INTERFACE in the "add" command documentation.
* Make it clear that using "add ...." in ppp.conf whenbrian1998-01-042-26/+112
| | | | | | | | not in -auto mode isn't a good idea, and that the add should be done in ppp.linkup instead. Change "add 0 0 HISADDR" to "add default HISADDR". It's more intuitive.
* Don't scribble on the stack if our input packet isbrian1998-01-041-1/+7
| | | | | bigger than our MRU. Moan and drop the packet instead.
* Initialize CcpInfo protocols to -1 (none, not OUI).brian1998-01-042-13/+18
| | | | Don't Call Term() for an algorithm that hasn't been Init()d.
* Allow "set device" to close the open modem if we're inbrian1997-12-303-35/+39
| | | | | | | | | | | | | | | | | interactive mode. Use `netfd' in fcntl() and tc[gs]etattr() calls rather than the hard coded descriptor 0. Use _FILENO constants from unistd.h This un-breaks things after my recent `close(0)' in interactive mode. Close STDIN_FILENO, and open _PATH_TTY O_RDONLY as `netfd'. This has the effect of allowing `show route' to output more than about a page of data (on FreeBSD, not OpenBSD....). I have no idea why, except that it was a direct consequence of the tcsetattr() in TtyCommandMode(). My previous fix (closing descriptor 0) `fixed' this because all calls to tcsetattr() failed :-(
* Typo in error message.brian1997-12-301-2/+2
|
* Use inet_aton() before gethostbyname()brian1997-12-301-6/+8
| | | | | Suggested by: Christian Sandberg <christian@yes.no> Eivind Eklund <perhaps@yes.no>
* Allow "add! dst mask gw" (note the ``!'') to do anbrian1997-12-305-32/+80
| | | | | | | | RTM_CHANGE if the RTM_ADD fails with an EEXIST. Allow "delete! dst" (note the ``!'') to silently fail if the RTM_DELETE fails with an ESRCH. Also, make the ESRCH and EEXIST error conditions more understandable to the casual observer.
* Don't complain that someone's changed the clock unless the timebrian1997-12-291-4/+5
| | | | | | after a select() interrupt is more than 1 second past what should have been the end time. We may just be running on an over-burdened machine.
* Show how much time is left before timing out in thebrian1997-12-295-13/+31
| | | | | `show timeout' output. Remove ipIdleSecs variable - it's not used.
* Don't expect select() to adjust the passed time when it'sbrian1997-12-283-53/+46
| | | | | | | | | | | interrupted with a SIGALRM. In fact, select() sets the passed time to zero, making the previous implementation terminate always after 1/10th of a second ! Also, deal with someone changing the clock while we're sleeping (and restart the whole sleep). Dangers pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Initialize mbuf::pnext.brian1997-12-282-3/+4
| | | | Complain to LogERROR if we have internal inconsistency (not LogDEBUG).
* If a packet causes a dial, continue to test whether it'sbrian1997-12-282-17/+7
| | | | | blocked in the output filter. If so, proceed with the dial despite dropping the packet.
* Allow initial sequence numbers less than what we're expecting.brian1997-12-281-6/+21
| | | | | | | When CCP is originally negotiated, the only thing we can be sure about is that we've started adding data to the inflate dictionary either before or at the same time as the peer. This is ok, 'cos DEFLATE is a `sliding window' compressor.
* Write to the routing socket as uid 0. It's not good enoughbrian1997-12-273-4/+17
| | | | to just open it as uid 0 under OpenBSD.
* Show who closes the diagnostic connection.brian1997-12-276-17/+28
| | | | | | Show the IP range (if specified) in "show ipcp". Close unused descriptors 0 and 2 in interactive mode. Pass (size_t *) rather than (int *) to sysctl().
OpenPOWER on IntegriCloud