Commit Graph

423 Commits

Author SHA1 Message Date
Brian Somers 6a596579bc Quieten gcc-2.8.1 1998-04-25 09:16:23 +00:00
Brian Somers c2f3ec0b46 Fix diagnostic typo. 1998-04-25 00:20:23 +00:00
Brian Somers 611f9a1b62 Cosmetic: .Dq -> .It 1998-03-16 07:33:57 +00:00
Brian Somers 1baf87502e Correct #ifdef for __FreeBSD__ < 3 1998-03-13 03:24:05 +00:00
Brian Somers 70a91e4c40 Add missing include 1998-03-13 01:55:47 +00:00
Brian Somers c4c4aaacea Add extraneous braces to stiffle warnings from gcc-2.8 1998-03-13 01:36:10 +00:00
Brian Somers 6b58627302 MFMP: Don't send LQRs when the peer has LCP REJ'd them. Send
ECHO LQRs instead.
1998-03-13 00:55:16 +00:00
Brian Somers f830032fc8 o Fix a few comment typos.
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.
1998-03-12 02:23:42 +00:00
Brian Somers 748496456a Explicitly call `caused' an `int'.
Sugested by: gcc-2.8
1998-03-08 23:39:33 +00:00
Brian Somers 4f2ef57437 Use the correct device name in -direct mode. 1998-03-06 00:35:30 +00:00
Brian Somers 45ad566f11 MFMP: Allow 8 character login names.
Do the login()/logwtmp()/logout() as id 0.
1998-02-19 02:10:13 +00:00
Brian Somers cb46a0a945 MFMP: LogWARN rather than LogERROR when we can't create
our diagnostic socket.
1998-02-18 20:40:32 +00:00
Brian Somers d0bb2cddc7 Don't leak memory when the peer sends PROTO_COMPD packets
without negotiating compression first.
1998-02-18 19:38:43 +00:00
Brian Somers dcf9e6a5b2 Move handle_signals() to before the FD_SETs. handle_signals()
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.
1998-02-10 22:33:43 +00:00
Brian Somers b3796ed639 Merge from MP branch:
Correct magic number format string
1998-02-04 01:06:23 +00:00
Brian Somers 48cf2a7958 Don't moan about not creating tunX.pid and ttyX.if if RELEASE_CRUNCH
is defined.
1998-01-29 00:44:15 +00:00
Brian Somers 4b633e0106 Talk a bit about ongoing development. 1998-01-29 00:42:52 +00:00
Brian Somers baef0a6974 Cosmetic:
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.
1998-01-27 23:14:53 +00:00
Brian Somers 4147817ab9 Fix error message.
Don't complicate the test compilation mentioned at the start of
the file.
1998-01-24 00:03:14 +00:00
Brian Somers 2e8ab8d16a Stop bogus warnings. 1998-01-23 22:29:16 +00:00
Brian Somers 813bfe4d88 Re-implement the proxy arp sockaddr_dl search routine (again).
It now works :-) and searches all interface aliases.
1998-01-23 21:37:27 +00:00
Brian Somers 0c2bc41c96 Don't allow manual dialing unless in auto or interactive mode. 1998-01-23 04:36:42 +00:00
Brian Somers 4d834db441 Use the sockaddr_dl with the link#, not the ethernet address
when creating proxy arp entries.
1998-01-21 12:52:14 +00:00
Brian Somers aa8e05197c Remove unused #includes.
Make various bits static.
Remove unused variables.
Submitted by: eivind
1998-01-21 02:15:33 +00:00
Brian Somers 49b239e0d2 Allow an optional delay when specifying "set openmode active".
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.
1998-01-20 22:47:48 +00:00
Brian Somers e2e26133df dlopen(..., RTLD_NOW) rather than RTLD_LAZY.
Pointed out by: John Polstra <jdp@polstra.com>
1998-01-19 22:59:57 +00:00
Brian Somers 677f680c33 sys/types.h -> sys/param.h
Pointed out by: Niklas Hallqvist <niklas@petra.appli.se>
1998-01-19 22:34:20 +00:00
Brian Somers c6fe0cb207 Reimplement proxy-arp address stuff using sysctl(). 1998-01-19 02:59:34 +00:00
Brian Somers d1a3ea477c Allow "set vj" for changing the default number of slots
and whether slot compression is requested.
Don't show current values with "show ipcp" if IPCP isn't
"opened".
1998-01-18 20:49:22 +00:00
Brian Somers ced716c30f Remove the necessity of -ldes and -lalias etc from release/Makefile.
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
1998-01-17 14:21:21 +00:00
Brian Somers 257b72c4fd Free our input mbuf when the FCS is good (oops, memory leak). 1998-01-14 01:47:50 +00:00
Brian Somers d6a02b89fb Lose __libalias_version.
We now look for the biggest of libalias.so.2.*
1998-01-14 01:23:05 +00:00
Brian Somers cc924f9e6f Lose <net/if_var.h> !
This'll require a `make installworld'.
1998-01-11 17:53:27 +00:00
Brian Somers 3a70c9f7bf Make things work when sizeof(long) != 32 (hopefully) 1998-01-11 17:50:49 +00:00
Brian Somers b1435e416f Remember any number of interface names. 1998-01-11 04:45:36 +00:00
Brian Somers b5b4c13254 Remove includes of if_var.h and in_var.h 1998-01-11 04:02:57 +00:00
Brian Somers 492e660800 Allow 6 byte interface names (for >tun99) 1998-01-11 02:59:22 +00:00
Brian Somers 86ca062379 Pause according to the redial setting when dialing manually.
Pointed out by: Berend de Boer <berend@compuserve.com>
1998-01-10 21:51:31 +00:00
Brian Somers 98baf7c8fd Implement Reset{Req,Ack} properly, as per rfc 1962.
(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!
1998-01-10 01:55:11 +00:00
Brian Somers 0ca7cafb96 Zap any addresses on the network side of the `tun' as soon
as we've successfully opened the /dev side.
1998-01-08 23:47:57 +00:00
Brian Somers 4e9914b708 Correct the return value of ReportProtStatus() ("show proto").
Submitted by: Dave Bodenstab <imdave@mcs.net>
1998-01-06 00:58:31 +00:00
Brian Somers 9c97abd8c3 o Allow the use of HISADDR as the first arg to "add".
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.
1998-01-05 01:35:20 +00:00
Brian Somers e1375e2807 Make it clear that using "add ...." in ppp.conf when
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.
1998-01-04 21:28:49 +00:00
Brian Somers 512db5555c Don't scribble on the stack if our input packet is
bigger than our MRU.  Moan and drop the packet
instead.
1998-01-04 20:26:37 +00:00
Brian Somers 79d1bdaedb Initialize CcpInfo protocols to -1 (none, not OUI).
Don't Call Term() for an algorithm that hasn't been Init()d.
1998-01-04 20:25:41 +00:00
Brian Somers 2a279fed14 Allow "set device" to close the open modem if we're in
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 :-(
1997-12-30 23:22:31 +00:00
Brian Somers 05d83ad6a4 Typo in error message. 1997-12-30 20:02:50 +00:00
Brian Somers adac5b72cc Use inet_aton() before gethostbyname()
Suggested by: Christian Sandberg <christian@yes.no>
              Eivind Eklund <perhaps@yes.no>
1997-12-30 20:02:32 +00:00
Brian Somers 65eea2e0fa Allow "add! dst mask gw" (note the ``!'') to do an
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.
1997-12-30 02:45:48 +00:00
Brian Somers f7d8bb14f0 Don't complain that someone's changed the clock unless the time
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.
1997-12-29 22:23:52 +00:00