Commit Graph

665 Commits

Author SHA1 Message Date
brian
903a0ea675 Mention ``show mp''.
Describe ACFComp correctly.
1999-05-02 08:52:50 +00:00
brian
bce3b34a2b Make ports 80 & 81 ``interactive''. 1999-05-01 11:31:29 +00:00
brian
7f54ce017a Change ``set device'' so that it parses its arguments as one
device per argument rather than the old way of concatenating
everything then splitting the result at commas and whitespace.

Old syntax of ``set device /dev/cuaa0, /dev/cuaa1''
may no longer contain the comma, but syntax such as
``set device "!ssh host ppp -direct label"'' is now
possible.
1999-04-27 00:23:57 +00:00
brian
c052ed7e84 Add support for NetBSD 1999-04-26 08:54:34 +00:00
brian
a5a4bcb82c #include <errno.h>, not <sys/errno.h> 1999-04-26 08:54:25 +00:00
brian
e02f30d0d8 Spelling police 1999-04-23 13:45:50 +00:00
brian
5941b98f5d int -> size_t 1999-04-21 08:13:25 +00:00
brian
85e63ecedc Split the recorded chap challenge into two - one for the
receiver and one for the sender.  This allows two simultaneous
chap conversations - something that I *thought* I was already
doing on a daily basis myself until the existence of the
problem was
Beaten into me by: sos
1999-04-21 08:03:51 +00:00
brian
a2a0a5e96b If ioctl TIOCMGET fails, continue. The device may be
a pseudo device created by an interactive version of
rlogin/telnet/ssh & friends
1999-04-21 08:03:35 +00:00
brian
23e10e5f4d Revert the ACCMAP changes where we OR the peers accmap
with our own if there are differing bits (last two revisions
of lcp.c).  This change broke at least one negotiation
session.
Instead, we just use an OR of the two accmap values when
we're doing the ASYNC framing.
1999-04-11 08:51:04 +00:00
brian
dcc4f6e14d When going from DATALINK_HANGUP directly to
DATALINK_OPENING, don't forget to change phase
to ESTABLISH if we're currently TERMINATE'ing.
Helped locate by: Chuck Robey <chuckr@mat.net>
1999-04-06 14:48:10 +00:00
brian
388eff56aa When we get an LCP TLU, go into PHASE_AUTHENTICATE
from any other phase besides PHASE_NETWORK, otherwise
there's a chance that we end up sending auth packets
and dropping the replies.
1999-04-05 21:52:10 +00:00
brian
7d46d3406e Remove forgotten variable. 1999-04-03 12:01:38 +00:00
brian
ddbfaa1494 Handle the detection of frames even if we read them
with more than one read().  When we detect one, don't
forget to pass it to async_Input() and drop our
terminal back into command mode.

Don't output an extraneous \r if we're passed \r\n
to prompt_vprintf in raw mode.
1999-04-03 11:54:00 +00:00
brian
d3c259f30d Drop PAP & CHAP packets if we're not in NETWORK or AUTHENTICATE
phase.
1999-04-01 11:05:23 +00:00
brian
30ff6b4d5e Avoid a few warnings on the alpha 1999-03-31 14:21:46 +00:00
brian
83fb217c7c Oops - remove register keyword 1999-03-31 13:44:07 +00:00
brian
a1bb7672e0 Another alignment bogon. 1999-03-31 13:33:43 +00:00
brian
b4052c4c73 Point at cs.slcs_u.csu_ip instead of the just-copied ``cp''
when recalculating the ip checksum.  cp is not guaranteed to
be aligned.  It now doesn't matter that cp isn't aligned as
the caller does another mbuf_Alloc() regardless.
1999-03-30 07:57:22 +00:00
brian
f414cf52f6 Maintain a `necessary' marker to indicate that we *probably*
need to process a signal (usually a SIGALRM).  Check to see
if we need to process a signal both before *and* after calling
select() as older (pre-2.0) versions of ppp used to.

This handles the possibility that ppp may block at some
point (maybe due to an open() of a misconfigured device).
Previously, we'd potentially lock up in select().

The `necessary' marker reduces the increased signal checking
overhead so that at full speed with no compression transferring
an 83Mb file via a ``!ppp -direct'' device, we get a 1%
throughput gain.
1999-03-30 00:44:57 +00:00
brian
ded96ee1e1 If we adjust our required ACCMAP due to a more restrictive
ACCMAP being REQuested by the peer, also increment our FSM
id so that we don't end up sending out a new REQ with the
same ID and different data (the changed ACCMAP).
1999-03-29 08:21:40 +00:00
brian
3b5efef0cd Ensure that the thing we're casting to struct ip
is aligned for non-i386 architectures.
1999-03-29 08:21:28 +00:00
brian
1195accd6f Allow port ranges in ``alias port''. 1999-03-25 23:36:25 +00:00
brian
9396bc70eb Undo possible damage done by the new TUNSIFMODE ioctl
in FreeBSD-current.
1999-03-25 11:37:51 +00:00
brian
ba6f770acc Do away with some literal text that is never switched
off - I *think* these were groff bugs.
1999-03-19 09:00:08 +00:00
brian
da0f251f17 Replace hardcoded quoting with Sq or Dq. 1999-03-19 01:42:45 +00:00
brian
a22c4a4b24 Don't forget to fully initialise the configured values
for MYADDR and HISADDR in ``set ifaddr'' so that unspecified
values don't end up retaining their `width'.
1999-03-19 00:05:32 +00:00
brian
7d17442eb8 Use ``Sx'' when xref'ing sections. 1999-03-18 21:53:56 +00:00
brian
c9bcf3b0cd Remove all remaining [ and ] characters (and do things properly). 1999-03-18 21:50:52 +00:00
brian
b2fb6d323d Remove all hardcoded [...] syntax.
With help from: Daniel C. Sobral <dcs@newsguy.com>
1999-03-17 00:25:43 +00:00
brian
87bf772f6a Mention changes to the default authentication behaviour. 1999-03-16 11:54:02 +00:00
brian
3c07b19842 Detect pred1 packets where the length != the packet length
Use a maximum of MAX_MRU + 2 bytes for incoming packets, not
MAX_MTU + 2.
Tidy up some diagnostics.
1999-03-16 01:24:23 +00:00
brian
008e35689f Tone down the log levels (Log{ERROR,WARN} -> LogCCP)
when we've simply missed a packet.

When our Predictor1 CRC is wrong (implying we've dropped
a packet), don't send a ResetReq().  Instead, send another
CCP ConfigReq().  *shrug*  My tests show this as being far
worse than the ResetReq as we may have further Nak/Rejs etc
and we're basically resetting both our incoming and outgoing
compression dictionaries, but rfc1978 says the ConfigReq is
correct, so we'd better go along...
1999-03-11 01:49:15 +00:00
brian
71a119bd26 If /etc/ppp/ppp.conf doesn't exist, mention that the
configuration file can't be found rather than saying
that the label can't be found.
Pointed out by: Greg Black <gjb@comkey.com.au>
1999-03-09 20:39:03 +00:00
brian
f2c188ce82 Don't destroy the old server socket another ``set server''
call fails.
1999-03-08 22:35:19 +00:00
brian
5d8df9e0ac Don't forget to call modem_Found() when connecting
via an external program - otherwise we get no
throughput stats and connection count increase.
1999-03-07 20:58:48 +00:00
ghelmer
0a5926b4f6 Add leading 0 in front of octal file permissions number.
OK'ed by:	Brian Somers <brian@freebsd.org>
PR:		docs/9843
1999-03-07 20:27:45 +00:00
brian
775e562cdb Support PPTP via libalias (``alias pptp addr''). 1999-03-07 18:13:44 +00:00
brian
462c764e61 Support proxying & transparent proxying curtesy of libalias(3).
Order the alias command descriptions.
Order the SEE ALSO entries.
1999-03-07 15:02:38 +00:00
brian
89bd672810 Correctly drop existing connections when reopening the diagnostic
socket.
1999-03-07 11:54:43 +00:00
brian
3607438c88 Read from fd[0] and write to fd[1] where `fd' is the
result of a pipe().  This matters under OpenBSD.
1999-03-07 01:41:40 +00:00
brian
1b1f7f16af Use socketpair() instead of pipe()... pipe() doesn't return
two bi-directional descriptors under OpenBSD.
1999-03-07 01:41:27 +00:00
brian
472b78ec02 Reopen descriptor 0 as /dev/tty when in interactive mode
in OpenBSD as well as FreeBSD (I still don't know why).
Add a debug diagnostic when creating a child process as
a link.
1999-03-07 01:02:39 +00:00
brian
72c64b071c Extend the ``set redial'' command to allow incremental
redial timeouts.
1999-03-04 17:42:15 +00:00
brian
6754c32c15 Correct some ntohl/htonl bogons in the netmask handling.
This was pretty harmless as netmasks on a POINTOPOINT
interface are pretty much ignored, but it looked funny.

Mention the configured netmask in ``show ipcp''.

Describe in more detail what a proxy arp entry is.
1999-03-03 23:00:41 +00:00
brian
60d6953b0e When negotiating ACCMAPs, sync our ACCMAP with the
peers by ORing the two together and NAKing or REQing
the result rather than allowing seperate local/peer
values.
If the peer REJs our ACCMAP and our ACCMAP isn't 0,
warn about it and ignore the rejection.
1999-03-01 13:46:45 +00:00
brian
3d2de27bce Comment why we do a TLF when we get a ``Down'' event in state
``closing''.

Pointed out by: archie

Don't do a TLF when we get a ``Catastrphic Protocol Reject'' event
in state ``closed'' or ``stopped''.

Pointed out but not suggested by: archie

This makes no difference in the current implementation as
LcpLayerFinish() does nothing but log the event, but I disagree
in principle because it unbalances the TLF/TLS calls which
(IMHO) doesn't fit with the intentions of the RFC.

Maybe the RFC author had a reason for this.  It can only happen
in two circumstances:

- if LCP has already been negotiated then stopped or closed and we
  receive a protocol reject, then we must already have done a TLF.
  Why do one again and stay in the same state ?

- if LCP hasn't yet been started and we receive an unsolicted
  protocol reject, why should we TLF when we haven't done a TLS ?
1999-03-01 02:52:39 +00:00
brian
e939a862cb Bring up auto links despite there being no data queued if
we're already in network phase and our autoload values
are set with no minimum threshold (the default).

Tell the autoload timer that it's ``coming up'' *before*
calling AutoLoadTimeout() directly... not after.  This
prevents the very first demand-dial connection from
immediately disconnecting when there are other auto links.

Problem diagnosis:  Ted Mittelstaedt <tedm@toybox.placo.com>
1999-03-01 00:43:48 +00:00
brian
795be649bf Allow control over the number of ConfigREQ & TermREQ attempts
that are made in each of the FSMs (LCP, CCP & IPCP) and the
number of REQs/Challenges for PAP/CHAP by accepting more arguments
in the ``set {c,ip,l}cpretry'' and ``set {ch,p}apretry'' commands.

Change the non-convergence thresholds to 3 times the number of configured
REQ tries (rather than the previous fixed ``10'').  We now notice
repeated NAKs and REJs rather than just REQs.

Don't suggest that CHAP 0x05 isn't supported when it's not configured.

Fix some bugs that expose themselves with smaller numbers of retries:
o Handle instantaneous disconnects (set device /dev/null) correctly
  by stopping all fsm timers in fsm2initial.
o Don't forget to uu_unlock() devices that are files but are not
  ttys (set device /dev/zero).

Fix a *HORRENDOUS* bug in RFC1661 (already fixed for an Open event in state
``Closed''):
  According to the state transition table, a RCR+ or RCR- received in
  the ``Stopped'' state are supposed to InitRestartCounter, SendConfigReq
  and SendConfig{Ack,Nak}.  However, in ``Stopped'', we haven't yet
  done a TLS (or the last thing we did is a TLF).  We must therefore
  do the TLS at this point !

  This was never noticed before because LCP and CCP used not use
  LayerStart() for anything interesting, and IPCP tends to go into
  Stopped then get a Down because of an LCP RTR rather than getting a
  RCR again.
1999-02-26 21:28:14 +00:00
brian
dfde3fefb0 Parse IP addresses more securely - specifically, don't allow
a bum name to return as 0.0.0.0... we don't want ``delete xxx''
to delete the default route when xxx doesn't resolve.

Support IP number specifications as the host when specifying
a tcp-style device (rather than *just* hostnames).
1999-02-25 20:05:55 +00:00