Commit Graph

1048 Commits

Author SHA1 Message Date
Brian Somers
53dc037c22 Correct a few diagnostics 1999-10-16 13:28:04 +00:00
Brian Somers
7ca1ffb46f Don't ntohl() the signature before printing it... it's already
been done.

Spotted by: Gert-Jan Vons <gert-jan@bigfoot.com>
1999-10-16 09:18:15 +00:00
Brian Somers
c2e1f0e3d7 When more than one timer is expired at once, allow for the possibility
that the first timer ends up doing a timer_Stop() on the second.

When this happens, remove the timer from the pending list so that
we still call any subsequent timers.

This bug has been here for several years, but has only been tickled
recently with my device layering changes.

With enormous thanks for the perseverance of: Ruslan Ermilov <ru@ucb.crimea.ua>
1999-10-15 20:44:34 +00:00
Brian Somers
d4d5d2f881 When we get the last NCP TLD, close all datalinks with CLOSE_STAYDOWN
rather than CLOSE_NORMAL.
1999-10-15 20:36:04 +00:00
Brian Somers
1d3a2f02e5 Redefine CRTS_IFLOW and CCTS_OFLOW on the mac.
Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
1999-10-15 20:30:44 +00:00
Brian Somers
71981dcfc1 When uncompressing VJ-compressed frames, fix the ip_sum directly
in struct cstate rather than copying the stored header slot into a
potentially mis-aligned buffer then trying to update the ip_sum
without causing an exception on non-i386 hardware.

I've never been able to reproduce this problem, but it has been
reported by many people... besides, the code is now a bit cleaner.

Testing & patience by: Anthony Solovjoff <asolovjoff@hotmail.com>
1999-10-13 07:49:13 +00:00
Brian Somers
d81ecf9abf Revert the 1.44 -> 1.45 change. It doesn't work as expected. 1999-10-08 16:09:15 +00:00
Brian Somers
14e34a55c3 Don't go from datalink state opening directly to lcp, go via
carrier instead so that we can set up our carrier detect
timer and eventually notice when we lose carrier.

Honour the script.run value when coming out of carrier state.

PR:	14145
1999-10-07 07:32:12 +00:00
Brian Somers
990a543f49 Mention the received/expected magic for dodgy ECHO LQRs. 1999-10-06 23:22:54 +00:00
Brian Somers
d2f5232de3 Bring links down gently when their throughput isn't enough for
the ``set autoload'' value.  Don't just ``down'' the link.
Don't get stuck in ``ready'' the first time we ``close'' a link.
1999-10-05 05:01:44 +00:00
Brian Somers
28149effa7 Support GRE packets
Submitted by: Harry Starr <starr@gccs.com.au>
1999-09-30 07:23:13 +00:00
Brian Somers
ccd587f00f Support ``set cd off'' to tell ppp not to even look for carrier on the
device.
1999-09-26 23:02:18 +00:00
Brian Somers
3c9497b9e0 Typo
Submitted by:	Alex Nash <nash@mcs.net>
1999-09-24 23:57:22 +00:00
Brian Somers
735ce767c7 Allow ``make -DNOKLDLOAD'' 1999-09-22 00:44:45 +00:00
Brian Somers
fc3034ca7d Do a kldload() if we get ENXIO trying to open /dev/tun0
Originally submitted by: green
1999-09-22 00:40:47 +00:00
Brian Somers
b9391689ee Back out the bogus #ifdef __NetBSD__ #include <signal.h> lines.
The original report was due to a mis-installation of the NetBS
header files :-/

Submitted by:	 Kazuyoshi Kato <kazk@yyy.or.jp>
1999-09-21 19:37:00 +00:00
Brian Somers
3927c47b04 Fix the `lt'' comparison in `set filter''
PR:		13819
Submitted by:	Dean M. Phillips <dphill@inav.net>
1999-09-21 01:02:05 +00:00
Alexey Zelkin
c6d6e7726f Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
Brian Somers
7e795ebe38 NetBSD has moved ``extern int errno;'' to signal.h :-/
Submitted by:	Kazuyoshi Kato <kazk@yyy.or.jp>
1999-09-20 07:36:46 +00:00
Brian Somers
a77cab77c5 NetBSD requires net/if.h for the IFF_* defines (as well as OpenBSD) ! 1999-09-20 07:18:50 +00:00
Brian Somers
4d9d17fe7d Correct the return from FilterCheck for fragments
PR:		13771
Submitted by:	Dean M. Phillips <dphill@inav.net>
1999-09-16 18:47:59 +00:00
Brian Somers
f02c2029cf Cosmetic:
alias_cmd -> nat_cmd after a repo-copy
1999-09-08 07:34:52 +00:00
Brian Somers
55b9d469e8 We don't need a queue for *CP data - these are IP-only queues. 1999-09-07 14:34:55 +00:00
Brian Somers
da47788649 Introduce a forth IP packet queue. Urgent packets with
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.
1999-09-07 07:51:11 +00:00
Brian Somers
19c566804c Make the ``Problem with IP header length'' error a bit more verbose 1999-09-06 18:20:26 +00:00
Brian Somers
f914f3c09c $FreeBSD$ -> __DATE__
This is probably more appropriate that $Date$ anyway
1999-09-06 18:11:50 +00:00
Brian Somers
b4f63b0b8b When logging warning messages, there are now three scenarios:
o If a prompt is executing the command, only display the warning to
  that prompt
o If a prompt is executing a ``load'' command, display the warning
  to all prompts *and* syslog
o Otherwise, display the warning to all prompts *and* syslog.
1999-09-06 08:16:33 +00:00
Peter Wemm
2735dafdfc $Date$ -> $FreeBSD$ 1999-09-06 07:36:44 +00:00
Brian Somers
442f849547 o Split the two IPCP queues into three - one for FSM data
(LCP/CCP/IPCP), one for urgent IP traffic and one for
  everything else.
o Add the ``set urgent'' command for adjusting the list of
  urgent port numbers.  The default urgent ports are 21, 22,
  23, 513, 514, 543 and 544 (Ports 80 and 81 have been
  removed from the default priority list).
o Increase the buffered packet threshold from 20 to 30.
o Report the number of packets in the IP output queue and the
  list of urgent ports under ``show ipcp''.
1999-09-04 00:00:21 +00:00
Brian Somers
f10f520361 When sending radius authentication requests:
Supply RAD_NAS_IDENTIFIER if we have a `hostname` and
  RAD_IP_ADDRESS if that hostname resolves.

  Supply RAD_NAS_PORT using the ttyslot() of the tty that
  we're authenticating on if it's a tty device.

Partially submitted by: Andriy I Pilipenko <bamby@marka.net.ua>
PR:			12225
1999-09-03 10:31:34 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Jordan K. Hubbard
3b3533f56d I misunderstood the failure mode - revert BINMODE to 4554. I'm still
going to remove ppp from the installation options in 5 days if ppp is
still broken, however, as it hasn't worked at installation time
for several weeks now and it's only causing people to fill my mailbox
with questions.
1999-08-27 07:47:17 +00:00
Jordan K. Hubbard
4d391b8dd9 I don't know who decided that an install mode of 4544 was correct, but
for a binary it's far from it.  This is why sysinstall is unable to run
ppp at startup time and causing weirdies in -current.
1999-08-27 06:01:27 +00:00
Brian Somers
8473f372df Rebuild the list of interface numbers to names if we're trying
to evaluate an interface number that didn't previously exist.
1999-08-26 20:01:20 +00:00
Brian Somers
6fd578c435 Aligh mbufs to sizeof(long), not 4 1999-08-26 06:37:53 +00:00
Brian Somers
28f6cd8d9d Fix some mdoc(7) style inconsistences
Submitted by: Alexey M. Zelkin" <phantom@cris.net>
1999-08-25 21:39:40 +00:00
Brian Somers
4c960c5274 Cosmetic: bring closer to RELENG_3 1999-08-23 23:13:59 +00:00
Brian Somers
a3d4bca7a0 NOALIAS -> NONAT
Reminded by: jkh
1999-08-22 23:17:57 +00:00
Brian Somers
d40a462ae2 Allow authkey to be changed independently of the current phase. 1999-08-22 01:29:53 +00:00
Brian Somers
67b072f732 o Add the -foreground switch. This switch behaves like -background except
that ppp stays in the foreground.
o Add the -quiet switch to quieten ppps startup
o Add the -nat flag and discourage the use of the -alias flag.  Both do
  the same thing.
o Correct some nat usage strings.
o Change the internal ``alias'' command to ``nat''.
1999-08-19 18:15:52 +00:00
Brian Somers
62d50f2278 Mention `alias enable no'', not `alias enable off''. 1999-08-18 15:35:54 +00:00
Brian Somers
dade2407e6 Implement a minimum idle time value as an optional second argument
to ``set timeout''.
This is useful for situations where your minimum call charge is (say)
5 minutes (like mine is)
1999-08-17 17:22:46 +00:00
Brian Somers
44e73c1254 Set the close-on-exec flag for all unused descriptors when
exec()ing other programs.
1999-08-17 14:59:05 +00:00
Brian Somers
8a59beb7de If we receive an IPCP protocol reject, bring it down. 1999-08-10 08:42:20 +00:00
Brian Somers
cde8638bc5 Back out the last patch. I'm too tired to apply patches. 1999-08-09 23:49:59 +00:00
Brian Somers
02b485a4b8 Remove CLOCAL when we're not in -dedicated mode.
PR:		13046
Submitted by:	Vsevolod Lobko <seva@alex-ua.com>
1999-08-09 23:38:56 +00:00
Brian Somers
e531f89a62 Change printf formats %q[du] -> %ll[du] 1999-08-09 22:56:18 +00:00
Brian Somers
1080ea25e8 Insist that ppp.conf and it's parent directories aren't `other'
writable rather than not being writable at all.

PR:			13009
Kind-of submitted by:	Anthony Kimball <alk@pobox.com>
1999-08-09 22:54:51 +00:00
Brian Somers
b18a6818a6 Silence a warning about uninitialized variables. 1999-08-08 17:36:10 +00:00
Brian Somers
7ad4503cb4 Don't includei 4b support on the alpha 1999-08-08 17:35:35 +00:00
Brian Somers
9cf01ccf8c Don't log_Printf(..., buf) in case buf contains %s
Info provided by: Ollivier Robert <roberto@keltia.freenix.fr>
1999-08-08 15:19:00 +00:00
Brian Somers
eb6e5e05f9 Add ISDN support via isdnd & i4b. This requires version
0.81.1 of the i4b code - namely support of the I4B_VR_REQ
ioctl via the i4brbchX device.

Ppp controls the phone number, but idle timers and
SYNC/RAW decisions are still made by isdnd (in isdnd.rc).

This involves a new datalink state machine phase.  The
``wait for carrier'' phase happens after dialing but
before logging in.  The whole dial state should really
be abstracted so that each device type can deal with it
in its own way (thinking about PPPoE) - but that'll have
to wait.

The ``set cd'' symantics remain the same for tty devices,
but we now delay until we either get CD or timeout waiting
(at which time we drop the link if we require CD).

For i4b devices we always insist on carrier.

Thanks to hm@ for his help, and especially for pointing out
that I *don't* need to re-implement isdnd (that was a huge
waste of time !) :-]
1999-08-06 20:04:08 +00:00
Brian Somers
dbb69e525e If the clock is put back, ensure that we don't end up dividing by
zero when calculating our throughput
1999-08-06 01:34:03 +00:00
Brian Somers
ab2de065b2 o Obsolete the undocumented ``set weight'' command.
o If we're using RADIUS and the RADIUS mtu is less than our
  peers mru/mrru, reduce our mtu to this value for NetBSD too.
o Make struct throughput's sample period dynamic and tweak the ppp
  version number to reflect the extra stuff being passed through
  the local domain socket as a result (MP mode).
o Measure the current throughput based on the number of samples actually
  taken rather than on the full sample period.
o Keep the throughput statisics persistent while being passed to
  another ppp invocation through the local domain socket.
o When showing throughput statistics after the timer has stopped, use
  the stopped time for overall calculations, not the current time.
  Also show the stopped time and how long the current throughput has
  been sampled for.
o Use time() consistently in throughput.c
o Tighten up the ``show bundle'' output.
o Introduce the ``set bandwidth'' command.
o Rewrite the ``set autoload'' command.  It now takes three arguments
  and works based on a rolling bundle throughput average compared against
  the theoretical bundle bandwidth over a given period (read: it's now
  functional).
1999-08-05 10:32:16 +00:00
Brian Somers
93a25fb90a Reorganise ppp's usage to avoid some mandoc limitations.
Suggested by: wollman
1999-08-03 16:14:38 +00:00
Brian Somers
badaf18d92 Mention that ospf is a possible filter protocol. 1999-08-02 21:45:36 +00:00
Brian Somers
62e85934b8 #ifdef IPPROTO_OSPFIGP before expecting it to be defined.
This unbreaks OpenBSD.
1999-08-02 15:29:19 +00:00
Brian Somers
2faae814fb Filter ospf and igmp separately.
Kind-of submitted by: phk
1999-08-02 11:53:16 +00:00
Brian Somers
12197c9e76 Mention which rfc the DNS/NBNS IPCP extensions come from. 1999-07-29 14:37:26 +00:00
Brian Somers
7722ec20ee Don't return a garbage mbuf pointer after storing it
as an unresolved fragment.
1999-07-28 19:39:00 +00:00
Brian Somers
804c097b9e Fix a load of typos
Use sizeof, not a hardcode value.

Some of it submitted by:  Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
1999-07-28 03:01:52 +00:00
Brian Somers
cad7e7426a o Overhaul filtering, adding facilities to jump over rules and to
negate the sense of rules.
o Remove the redundant (and undocumented) ``host'' and ``port''
  words (README.changes updated).
o Don't permit (and ignore) garbage instead of the protocol.

Mostly submitted by:  Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
1999-07-27 23:44:00 +00:00
Brian Somers
8d14e328f9 If we've negotiated CBCP and have also specified ``none'' as a possible
callback option, and the server sends us CBCP_NONUM, proceed directly
to the network phase rather than insisting on our configured CBCP
option.

Mostly submitted by: kkphang <phang@dgate.po.my>
1999-07-27 13:47:59 +00:00
Brian Somers
83a18abc10 Be a bit more consistent with variable names. 1999-07-27 00:30:32 +00:00
Brian Somers
b4d797e707 Fix an off-by-one error and correct the man page WRT clearing
filters.

Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
PR:		12437
1999-07-26 11:15:11 +00:00
Brian Somers
ef8fcfa7f2 When we fetch previously retrieved IP fragments from the alias
tables, copy them correctly back into our mbuf rather giving a
bzero'd count to memcpy() and ending up with a 0 byte fragment.

The old code resulted in a 0 byte write to the tun device which
tickled a bug that resulted in a panic :-(
1999-07-24 02:53:39 +00:00
Brian Somers
02ad5579d0 Fix a typo
Submitted by:	Rich Wood <rich@chugaboom.net>
1999-07-17 10:33:57 +00:00
Brian Somers
55b04d88d5 Don't declare `end' if we aren't compiling radius support. 1999-07-15 02:02:51 +00:00
Brian Somers
ad21dff290 Oops - add a missing cast. 1999-07-10 00:08:19 +00:00
Brian Somers
32bd4110d5 Leap through one more hoop to avoid alignment problems. 1999-07-10 00:03:58 +00:00
Brian Somers
ddd6808024 Don't bother read()ing if we ``expect'' nothing in our chat script. 1999-06-26 02:54:36 +00:00
Brian Somers
6a32b41413 If we run out of chat script immediately after a successfully executed
expect-send-expect sequence, finish gracefully, don't core dump.
This bug has been there for over a year - I could never reproduce it !

Straw provided by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
1999-06-26 02:54:24 +00:00
Brian Somers
1f9e5fe5fa Support `igmp' filters.
Mostly submitted by: Timo Geusch <freebsd@sleepycat.ukpeople.net>
1999-06-23 16:48:24 +00:00
Brian Somers
6ca65df0a7 Disable TUNSLMODE when we first open the tun device.
Submitted by: Ian West <ian@niw.com.au>
1999-06-22 11:31:42 +00:00
Brian Somers
08da4867ae Don't use the ``next'' redial timer if we have no phone number at all. 1999-06-18 13:49:01 +00:00
Brian Somers
ec3026b6f7 Come up with something useful when someone searches for
``dynamic IP''.
1999-06-14 10:12:41 +00:00
Brian Somers
ad227d8bcc Show the correct error if we fail to open a device. 1999-06-11 13:28:29 +00:00
Brian Somers
fbe3e6af84 Describe why a ``magic'' enddisc is not always a good idea. 1999-06-11 11:27:18 +00:00
Brian Somers
5dfb9210ae Allow reserved substitution strings to be escaped by preceeding them
with a backslash.
1999-06-10 09:34:57 +00:00
Brian Somers
194c225d5c Never bring a link back up after receiving a terminating signal,
don't rely on already being in PHASE_DEAD.
1999-06-10 09:06:30 +00:00
Brian Somers
9afe6bdaee Allow a remote IP and port range specification in the
``alias port'' command.
1999-06-10 00:17:27 +00:00
Brian Somers
ab959eb2b3 Initialise `mp'. 1999-06-09 20:27:26 +00:00
Brian Somers
7063995c94 Allow our endpoint discriminator to be enabled, disabled, accepted
and denied.  This is necessary for some MP implementations that
get confused if you accept their endpoint discriminator but reject
their MRRU.
1999-06-09 16:54:04 +00:00
Brian Somers
8fb106c674 Use the correct pid when substituting PROCESSID.
Problem reported by: Amedeo Beck Peccoz <gea@gressoney.it>
1999-06-09 08:47:36 +00:00
Brian Somers
68645f3954 Don't use static variables if we don't have to. 1999-06-08 20:12:06 +00:00
Brian Somers
c506ecd549 Don't drop the last character from lines in ppp.secret unless it's '\n'. 1999-06-08 20:11:53 +00:00
Brian Somers
aa8574707e Don't IPCP TLD if we're already doing it. This prevents
recursion by doing something like ``down'' or ``quit all''
in ppp.linkdown.
1999-06-08 11:58:27 +00:00
Brian Somers
b12ce35537 Make the `load'', dial'' and `open'' commands a big clearer.
Requested by: Michael Heitmeier <MICHAEL_HEITMEIER@HP-Germany-om12.om.hp.com>
1999-06-08 11:57:59 +00:00
Brian Somers
f5a99677a3 Correct the way ppp transfers links on the server side in MP
mode by padding out the ``struct device'' to the maximum
device size.
Bump the ppp version number to indicate the transfer format
change.

This should make MP over tty and udp devices functional again.
1999-06-05 21:36:00 +00:00
Brian Somers
64e0f466ce Fix some MP sequence number comparison bogons that are tickled by
having different speed links in a bundle.  This would manifest itself
by having the link occasionally hang, but revive when a new connection
is made....
Make ``show mp'' a bit prettier.
1999-06-03 13:29:32 +00:00
Brian Somers
fa0d521656 Oops, quieten a compiler warning. 1999-06-02 23:06:21 +00:00
Brian Somers
0d4fe7a80f Mention physical and sync logging in the ``set log''
usage message.
1999-06-02 21:28:02 +00:00
Brian Somers
411675bae3 o Alter the mbuf type as it's processed by different layers.
o Show more information about missing MP fragments in ``show mp''.
o Do away with mbuf_Log().  It was showing mbuf stats twice on
  receipt of LCP/CCP/IPCP packets.... ???!!?
o Pre-allocate a bit extra when creating LQR packets to avoid having
  to allocate another mbuf in mbuf_Prepend().
1999-06-02 15:59:09 +00:00
Brian Somers
ac685e314f Introduce the ``keep-session'' option. Refer to the man
page for details.  This allows MP over non-tty devices where
the original ppp process must not exit (such as sshd-spawned
ppp sessions).
1999-06-02 00:46:55 +00:00
Brian Somers
e6923505ee Increase the length of an individual device name to LINE_LEN.
Adjust the base physical device name correctly after a link
transfer (allowing correct multilink callbacks).
1999-06-01 19:08:59 +00:00
Brian Somers
ba16c8408d Make async/sync/physical/hdlc dumps prettier by showing printable
characters at the end of the line in hexdump style.
1999-06-01 16:01:48 +00:00
Brian Somers
d7452b10bd Mention that using MYADDR and HISADDR with ``set filter''
will result in the rules being updated any time MYADDR
or HISADDR change.
1999-06-01 08:46:53 +00:00
Brian Somers
1d1fc0171e Remember if MYADDR or HISADDR is used in a filter add tweak all
filters any time either value changes.
1999-05-31 23:57:40 +00:00
Brian Somers
65cec6e754 Don't forget to free the mbufs that get processed by
mp_Assemble().
Leak spotted by: louqi
1999-05-28 08:03:24 +00:00
Brian Somers
2b14671a9d Handle unterminated quoted strings without dup'ing the last character
with an out-by-one-memcpy.
1999-05-27 16:51:47 +00:00