Commit Graph

235 Commits

Author SHA1 Message Date
Brian Somers
a7ec696209 Fix a few typos
Submitted by: Forgotten (sorry)
1998-11-08 13:05:30 +00:00
Brian Somers
c2896afbb9 Don't delete the primary interface address when
``iface clean'' is used in auto mode while there
are no active links.
1998-11-05 21:59:48 +00:00
Brian Somers
7cf368eb42 Allow multiple systems (config labels) on the command
line and in the ``load'' & ``dial'' commands.  The last
label loaded becomes the current label name.
Only require a label for -auto mode.
1998-10-31 17:38:47 +00:00
Brian Somers
0f781a7252 Add ``set proctitle'' for changing argv[0]. All substitutions
are done in the same way as command execution.

For example, ``set proctitle USER INTERFACE PROCESSID'' would
be useful in a -direct profile for identifying who's connected.
1998-10-27 22:53:22 +00:00
Brian Somers
a237dcba17 Add ``PROCESSID'' as a constant expanded when running
commands.
1998-10-27 22:53:19 +00:00
Brian Somers
0460185ddf Stress that `none'' must be specified on the set callback'
line if callback is to be optional.
Requested by: Andrzej Tobola <san@koziolek.lublin.top.pl>
1998-10-27 22:53:18 +00:00
Brian Somers
3afe5ccb75 Add ``enable proxyall'' support. This adds proxy ARP entries
for every machine on every class C or smaller subnet that we
route to.
Add ``set {send,recv}pipe'' for controlling our socket buffer
sizes.
Mention the IP number with the problem in a few error messages.
All submitted by:     Craig Leres <leres@ee.lbl.gov>
Modified slightly by: me
1998-10-26 19:07:39 +00:00
Brian Somers
17871c5f6c Fix the interface alias code. Previously, I was expecting something
like

tun0: flags=blah
	10.0.0.1 -> 10.0.0.100
	10.0.0.2 -> 10.0.0.100
	10.0.0.3 -> 10.0.0.100

to DTRT, despite the SIOCAIFADDR for each new alias returning
-1 & EEXIST while adding the alias anyway.  In real life, once
we have the second alias with the same destination, nothing will
route any more !  Also, because I was ignoring EEXIST, the
dynamic IP assignment code was assigning duplicate addresses
('cos it was being lied to by iface_inAdd()).

Now we have

tun0: flags=blah
	10.0.0.1 -> 255.255.255.255
	10.0.0.2 -> 10.0.0.100
	10.0.0.3 -> 255.255.255.255

This works - stuff bound to 10.1 & 10.3 will be considered alive
by the kernel, and when they route back to the tun device, the
packets get aliased to 10.2 and go out to 10.100 (as with the
original plan).

We still see the EEXIST in SIOCAIFADDR, but ignore it when our
destination is 255.255.255.255, assuming that the alias *was*
actually added.

Additionally, ``iface add'' may now optionally be given only
the interface address.  The mask & destination default to
255.255.255.255.
1998-10-26 19:07:36 +00:00
Brian Somers
8fa6ebe47d Solve the ``first connection'' problem that occurs on
demand-dial links with dynamic IP numbers where the program
that causes the dial bind()s to an interface address that is
subsequently changed after ppp negotiation.

The problem is defeated by adding negotiated addresses to the
tun interface as additional alias addresses and providing a set
of ``iface'' commands for managing the interface.  Libalias is
also required (and what a name clash!) - it happily IP-aliases
the address so that the source is that of the primary (negotiated)
interface and un-IP-aliases it on the way back.

An ``enable iface-alias'' is done implicitly by the -alias command
line switch.  If -alias isn't given, iface-aliasing is disabled by
default and can't be enabled 'till an ``alias enable yes'' is done.
``alias enable no'' silently disables iface-alias.

So, for dynamic-IP-type-connections, running ``ppp -alias -auto blah''
will work for the first connection, although existing bindings will
not survive a disconnect/connect as the TCP peer will be trying to
send to the old IP address - the packets won't route.

It's now a lot easier to add IPXCP to ppp with minor updates to
the new iface.[ch] (if anyone ever gets 'round to it).

It's also now possible to manually add interface aliases with
something like ``iface add 1.2.3.4/24 5.6.7.8''.  This allows
multi-homed ppp links :-)
1998-10-22 02:32:50 +00:00
Brian Somers
68b414d193 Revert SEE ALSO ordering to version 1.124
Patched correctly by: wosch
Blunder pointed out by: bde
1998-09-18 23:28:10 +00:00
Brian Somers
0122d745f5 Alphabeticalize SEE ALSO section. 1998-09-17 00:45:12 +00:00
Wolfram Schneider
acd8019083 Sort cross references. 1998-08-31 16:41:09 +00:00
Brian Somers
a804ec2201 Don't use `-width 20'', it's misleading. Use `-width XX''
instead.
1998-08-29 23:02:45 +00:00
Brian Somers
7fdd475323 Don't claim that the alias library isn't loaded until
used.
1998-08-29 23:02:43 +00:00
Brian Somers
131ef891c7 Add the following word substitutions when running a shell
command:
  AUTHNAME:     The local authname
  ENDDISC:      The local endpoint discriminator
  LABEL:        The configuration label in use
  PEER_ENDDISC: The peers endpoint discriminator
  USER:         The peers authname
1998-08-29 23:02:42 +00:00
Brian Somers
f80e09b53a Mention what ``set authname'' does in -direct mode. 1998-08-25 17:48:55 +00:00
Brian Somers
6f8e9f0a8a If we've got a full output buffer queue and cannot send
anything for two mintues (see ``set choked'' and ``show
bundle''), nuke the ip, mp and link level buffer queues.

This should fix problems where ``ppp -auto'' seems to stop
responding after failing to connect to the peer a few times.
1998-08-25 17:48:43 +00:00
Brian Somers
f841c4e56e Be careful about using ``.Bd -literal'' as groff sometimes keeps
the `-literal' after the closing .Ed.
Where this happens, use ``.Bd -unfilled'' with ``.It Li'' to dodge
the problem - it looks better too.
Problem reported by: Dom Mitchell <dom@phmit.demon.co.uk>
1998-08-11 18:59:36 +00:00
Brian Somers
7955cdca14 `dns' option defaults to disabled, not enabled. 1998-08-09 23:40:31 +00:00
Brian Somers
0f5ecc8b46 Add missing .El 1998-08-09 17:17:23 +00:00
Brian Somers
74e4a8dab7 /var/run/tunX.pid is created regardless of ppps mode.
Spotted by: Alex <garbanzo@hooked.net>
1998-08-09 17:17:10 +00:00
Brian Somers
92b0955883 o Support callback types NONE, E.164, AUTH and CBCP.
(see the new ``set callback'' and ``set cbcp'' commands)
o Add a ``cbcp'' log level and mbuf type.
o Don't dump core when \T is given in ``set login'' or
  ``set hangup''.
o Allow ``*'' and blanks as placeholders in ppp.secret and
  allow a fifth field for specifying auth/cbcp dialback
  parameters.
o Remove a few extraneous #includes
o Define the default number of REQs (restart counter) in defs.h
  rather than hardcoding ``5'' all over the place.
o Fix a few man page inconsistencies.
1998-08-07 18:42:51 +00:00
Brian Somers
c31ac0b396 Always dial immediately on `open'', dial'' and `call''.
We don't need a ``!''.
1998-07-31 19:50:24 +00:00
Brian Somers
ba23f3976a Allow an optional ``!'' in the open, dial & call commands.
When used, the redial timer is ignored and the modem is
opened immediately.
1998-07-29 18:21:17 +00:00
Brian Somers
3a2e4f621c o Fix remaining sizeof problems for 64 bit machines.
o Allow ``set ....'' when we have multiple links but aren't in
  multilink mode.
o Do a TLS when we receive a ``Open'' event in ``Closed'' state,
  despite the rfc state transition table.  This is clearly an
  error in the RFC as TLS cannot have yet been called (without
  TLF) in the ``Closed'' state.
  I've posted a message to comp.protocols.ppp for confirmation.
1998-06-27 23:48:54 +00:00
Brian Somers
897f9429f9 Add `ipcp'' as an optional argument to `open'', and make
open capable of re-negotiatiating the various layers.

It is now possible to change various link options and then
re-open the relevant layer, making the changes effective -
for example, switching off VJ compression or starting ECHO
LQRs on-the-fly.
1998-06-25 22:33:31 +00:00
Brian Somers
8901e74902 Suggest the use of `accept dns'', not `enable dns'' in
server mode.
1998-06-21 11:14:50 +00:00
Brian Somers
5c6a2cdce8 Mention the ``allow users'' command when describing
how to set things up for incoming connections.
1998-06-18 01:24:29 +00:00
Brian Somers
c12b786782 o Allow `set mrru'' or `set mrru 0'' to disable
multi-link mode.
o Fix a typo in the ``set mrru'' description.
1998-06-16 23:23:57 +00:00
Brian Somers
899011c4eb Don't bring the modem offline or hangup when ``down lcp''
is done.  Instead, behave like ``close lcp''.
1998-06-16 19:40:28 +00:00
Brian Somers
9c81b87d1e Make `close lcp' just close the LCP layer and not hangup. This is
useful for slirp users that wish to get their shell back after the
ppp session.  `close' with no args still hangs up as expected.
Required by: jmz
1998-06-15 19:05:27 +00:00
Brian Somers
41dbe0c7af Add the ``clear'' function.
Mostly submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca>
1998-06-12 20:12:26 +00:00
Brian Somers
87de006540 Correct arg hack
Submitted by: David Leonard <leonard@csee.uq.edu.au>
1998-06-12 17:45:26 +00:00
Brian Somers
05dbe14bd3 Some documentation corrections & typo fixes.... 1998-05-29 18:32:41 +00:00
Brian Somers
87f6044a4b Don't give .It too many args. 1998-05-21 23:45:10 +00:00
Brian Somers
d91d286164 MFMP: Make ppp multilink capable.
See the file README.changes, and re-read the man page.
1998-05-21 21:49:08 +00:00
Brian Somers
611f9a1b62 Cosmetic: .Dq -> .It 1998-03-16 07:33:57 +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
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
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
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
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
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
313572f3e3 Allow (and document) execution of commands from within
our chat script.
You can now even run chat(8) - see ppp.conf.sample.
1997-12-27 07:22:12 +00:00
Brian Somers
8fe71e0656 Allow multiple (comma seperated) devices on the "set device" line.
Submitted by: Derek Inksetter <derek@saidev.com>
1997-12-21 03:16:19 +00:00
Brian Somers
857a4bf337 Mention that leading whitespace is ignored when identifying comments. 1997-12-21 02:34:27 +00:00
Brian Somers
0ecc184e10 Cosmetic: Remove blank lines, add .Pp where necessary.
Submitted by:	Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-21 01:07:13 +00:00
Brian Somers
a09d09cbe7 Don't log the actual password when command-logging
"passwd xxxx".
1997-12-18 00:28:36 +00:00
Brian Somers
72ca96bfa5 o Log ******** instead of the actual password for "set authkey"
when command logging is switched on.
o Display ******** for the authkey for "show auth"
o Document how \P should be used, and document the other chat escapes
  while I'm there.
o Make sure the full command is displayed when a compound command
  fails - ie, "set novar rubbish" should say "set novar: Invalid command"
  rather than "novar: Invalid command"

Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org> (among others)
1997-12-17 21:21:42 +00:00
Brian Somers
b399b74b2d Wrap long lines
Submitted by:	Greg Lehey <grog@lemis.com>
1997-12-16 00:32:35 +00:00
Brian Somers
bcc332bdb0 Allow random IP number allocation to peer.
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).
Up the version number (1.5 -> 1.6).

Cosmetic:
  Log unexpected CCP packets in the CCP log rather than the ERROR log.
  Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
  than the ERROR log.
  Log failed route additions and deletions with WARN, not TCPIP.
  Log the option id and length for unrecognised IPCP options.
  Change some .Sq to .Ar in the man page.
1997-12-13 02:37:33 +00:00
Brian Somers
f01e577b07 Only allow one arg to `delete' - the mask & gateway aren't necessary.
Delete AF_LINK routes as well as AF_INET.
Allow the word `default' as the arg to `delete' or in place of the
first two args (dest & netmask) to `add'.
Accept INTERFACE as the third arg to `add'.

  You can now say `add default interface' to create a default route
  through the tun interface.  It's reported that subsequent bind()s
  will bind to a broadcast address and not to the address currently
  assigned to the tun device - this is the first step towards
  supporting that first connection that was around from before the
  dynamic IP negotiation....
1997-12-07 04:09:15 +00:00
Brian Somers
4bc84b8c11 Fix the CCP Type field value for DEFLATE.
(I *really* meant to do this  *before* committing the
deflate changes in the first place - oops).

Pppd is horribly broken in this respect - refer to the
ppp man page for details.  Ppp *WON'T* negotiate deflate
with pppd by default - you must ``enable'' and ``accept''
``pppd-deflate'' in your config.

While I'm in there, update the cftypes in ccp.c so that
we recognise some more protocols (we don't actually do
anything with them - just send a REJ).
1997-12-03 23:28:02 +00:00
Brian Somers
0053cc58a9 Abstract the CCP layer a level.
Add DEFLATE support.
1997-12-03 10:23:54 +00:00
Brian Somers
9a0b991f97 Add throughput logging (disabled by default).
Use "enable throughput" to see modem & IPCP throughput.
Removed an extraneous prompt()
1997-11-18 14:52:08 +00:00
Brian Somers
b351d6b7c3 uucplock is in section 3 not section 8 ! 1997-11-14 20:07:39 +00:00
Brian Somers
12ef29a81a Finish the security improvements:
o Add "allow" command:
      "allow users a b c" gives access to users a, b and c.
      "allow modes auto"  gives those users access to auto mode only.
      "allow users *" and  "allow modes *" are accepted.
      No users and all modes are allowed by default.
    UID 0 can do anything.
  o Set the current label with the "load" and "dial" commands
    so that the call to ppp.linkdown makes sense.
  o Up the verison number.
  o Don't OR MODE_AUTO for -background and -ddial.
  o Don't OR MODE_INTER when we get a diagnostic connection.
  o Allow up to 40 args per line (was 20).
  o "set ifaddr" only changes the interface in AUTO mode (with other
    modes, it happens after IPCP negotiation).
  o Sort command descriptions in the man page.
  o Support -dedicated mode where we just talk ppp forever (no login etc).
1997-11-11 22:58:14 +00:00
Brian Somers
8ea8442c9a Don't create a diagnostic socket by default.
Allow a password spec on the "set server" command line.
Use SIGUSR2 to close the diagnostic socket.
Some man page corrections.
1997-11-09 22:07:29 +00:00
Brian Somers
da2a8b4d42 Add the "!include" syntax.
Return 0 from "show" commands.
1997-11-09 17:51:27 +00:00
Brian Somers
50454ee744 Remove the use of $HOME/.ppp.* 1997-11-09 13:18:51 +00:00
Brian Somers
5106c67149 Introduce ID0 logging.
Stay as the invoking uid as much as possible.
Execution as a normal user is still forbidden for now,
so these changes are pretty ineffective.
The next commit will implement the modifications suggested
on -hackers a number of days ago.
1997-11-09 06:22:49 +00:00
Brian Somers
87786af251 Typo police. 1997-11-08 12:37:33 +00:00
Brian Somers
9633be85d7 o Spelling police.
o  Emphasize ``PPP''
o  x-ref other programs
o  Some minor clarifications
1997-11-06 00:25:33 +00:00
Brian Somers
a1e8f9372a Introduce [local] to "set log [local] ...". This spits
logging out to the screen in terminal mode - should be
good for installation problem diagnosis.
1997-11-04 01:17:05 +00:00
Brian Somers
d37641d82c Refer a bit to pppctl.
Suggested (far to subtly for his own good) by:	joerg
1997-10-05 14:27:08 +00:00
Brian Somers
6c9e376dfe Cosmetic: Be specific about using TABs in syslog.conf. 1997-10-05 10:29:32 +00:00
Brian Somers
7351f9d8e8 Allow Microsoft CHAP authentication.
This is a combination of MD4 & DES.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:52:37 +00:00
Brian Somers
301127fb0a Don't allow accept/deny when it's not appropriate.
Log PAP/CHAP users in utmp & wtmp, allowing it to
be avoided with "disable utmp"
1997-09-22 23:59:16 +00:00
Brian Somers
599864f851 Add a pppctl(8) xref.
Suggested by:	joerg
1997-09-21 13:06:43 +00:00
Brian Somers
f919b46768 Support CHAP using MD4
Suggested by: jordan
1997-09-17 23:17:57 +00:00
Brian Somers
10a91a42fc Cosmetic: Remove unused variables and build on OpenBSD. 1997-09-10 02:20:35 +00:00
Brian Somers
506474c87a Document the use of PAP/CHAP properly. 1997-09-09 21:01:53 +00:00
Brian Somers
881a8bbf54 Disable LQR by default. It causes too many problems
with too many ISPs to be a good default.  LQR is still
accepted by default.
1997-09-07 01:00:06 +00:00
Brian Somers
683cef3c33 Install as group ``network''
Insist that uid == 0 for client ppp
Disallow client sockets if no password is specified
Don't exit on failure to open client socket for listening
Allow specification of null local password
Use reasonable size (smaller) ``vector''s in auth.c
Fix "passwd ..." usage message
Insist on "all" as arg to "quit" (if any)
Drop client socket connection before Cleanup() when "quit all"
1997-09-04 00:38:22 +00:00
Brian Somers
709db7fbee Remove use of login_progok()
Suggested by: guido
1997-08-31 20:07:03 +00:00
Brian Somers
ce28475da5 Use login_progok(). 1997-08-27 20:11:16 +00:00
Brian Somers
4e752f44f0 Check the "prog.deny" login.conf capability and
refuse to run if "ppp" is in the list.
Suggested by:	"Daniel O'Callaghan" <danny@panda.hilink.com.au>
1997-08-26 23:20:16 +00:00
Brian Somers
81816fc583 Phone the number after the ``|'' whether the dial
OR login script fails.

Catch a small typo in the man page.
1997-08-23 23:14:24 +00:00
Brian Somers
c16615aa8b Update doc to use MYADDR in ppp.conf. 1997-08-21 17:16:21 +00:00
Brian Somers
de451c685c Add "set loopback on|off", defaulting to "on".
This tells ppp to loopback packets addressed to
the ppp interface IP coming *from* the tun
device.

This means that you can ping the tun interface IP
from inside :-)
1997-08-21 16:21:39 +00:00
Brian Somers
cb611434af Expand the "set stopped" command so that it can
idependently time out any of the FSMs.

Split LCP logging into LCP, IPCP and CCP logging,
and make room in "struct fsm" for the log level
that the state machine should use.
1997-08-20 23:47:53 +00:00
Daniel O'Callaghan
d053d1b926 Spelling police. 1997-08-19 11:27:00 +00:00
Daniel O'Callaghan
441de788b1 Typo fixes. 1997-08-19 11:18:34 +00:00
Brian Somers
3f6fd9230e Correct the forth arg to "set ifaddr". If specified,
it gives the IP number that should be used for initial
IPCP config requests, irrespective of MYADDR.
1997-08-19 01:10:24 +00:00
Brian Somers
b48dfe09c7 Introduce the "bg" command. It's pretty
much the same as "shell", but it's in the
background.
1997-08-18 20:15:10 +00:00
Brian Somers
0444761561 Typo police 1997-08-17 22:45:25 +00:00
Brian Somers
71144dc552 Allow the use of a "stopped" timeout via the
"set stopped" directive.  If the timeout occurs
it will cause a "Down" event, hanging up the line
if it's still up.  This *isn't* part of the FSM
diagram, but I consider it ok as a "higher level
implementation specific timeout" as specified in
the rfc ;-}

Discussed briefly with:	joerg
1997-08-17 20:45:50 +00:00
Brian Somers
5b9b04192a Allow specification of fallback phone numbers to
be used only if the dial script fails.
PR:		4262
1997-08-17 20:38:45 +00:00
Brian Somers
cad5afb077 Correct default log file name.
PR:		4065
Prompted by:	Steve Price <sprice@hiwaay.net>
Submitted by:	sjr1@flash.net
1997-08-10 22:03:20 +00:00
Brian Somers
c09be724d6 Allow a "hangup" capability.
You can now "ATZ" your modem when it's closed.

Submitted by:	peter@citylink.dinoex.sub.org (Peter Much)
1997-07-14 01:41:35 +00:00
Brian Somers
873725cc51 Make HUP cause an exit (as it used to), and make
INT cause a hangup - not exiting for -ddial & -auto.

HUP must exit because init sends this at system shutdown
time (why, I don't know), and we don't want to end up
redialing after the HUP (due to another dfilter packet).

Pointed out by and discussed with: ache
1997-07-01 21:31:28 +00:00
Brian Somers
01ec25112c Allow specification of a umask for local socket
creation in "set server" command.
1997-06-30 03:03:38 +00:00
Brian Somers
4ef16f24f2 Add "set server" to control the server socket.
Catch SIGUSR1 to re-init listening socket.
Document signal behaviour.

Add missing '\n's to LogPrintf(LogWARN,...)
Main() returns int not void.

AF_LOCAL ideal suggested a long time ago by: joerg
1997-06-25 19:30:05 +00:00
Brian Somers
9b5a20e10a Fix "delete all".
PR:		3913
1997-06-20 23:43:35 +00:00
Brian Somers
fd59deba96 Correct filter docs.
PR:		3464
Submitted by:	Stephen J. Roznowski <sjr1@flash.net>
1997-06-16 13:52:10 +00:00
Brian Somers
e696ee3b80 Fix "delete ...", it now only insists on
one arg too.

Discovered by:	Rikk Salamat <rikks@web-impact.com>
1997-06-13 03:59:36 +00:00
Brian Somers
94b3022ec7 Add ppp.linkdown file to compliment ppp.linkup.
Submitted by:	Forgotten
Passed on by:	Terry Dwyer 61 8 9491 5161 <tdwyer@io.telstra.com.au>

Also remove extraneous setuid(0) - it's only undone by
the subsequent call to SelectSystem().
1997-06-13 02:07:32 +00:00
Brian Somers
6ea261e21d Document ppp over tcp (how to tunnel) 1997-06-13 00:04:58 +00:00
Brian Somers
e979ce388b Make the man page a little more detailed.
Update the version number to 1.00.
Increase the predictor-1 buffer by 2 bytes.
1997-06-09 23:38:38 +00:00
Brian Somers
0e6f6af18d Remove mis-leading version info. 1997-06-03 00:35:03 +00:00
Brian Somers
6efd9292f6 Mega update to sort out bad implementations
of reconnect & -background.

o   Fix reconnect anomolies.
o   Make reconnect apply to failed LQR hangups (& mention in man page).
o   Make reconnect effective in -background mode.
o   Listen on socket in -background mode.
o   Try all phone numbers in -background mode.
o   Insist on system arg in -background mode.
o   Make a control-connection close command exit in -background mode.
o   Output status message to stdout on exit of parent in -background mode.
o   Don't notify parent of success too soon.
o   Describe termination EX_* code.
o   Miscelaneous diagnostic corrections.
o   Remove redundant connect_time from modem.c.
o   Don't repeatedly DownConnection().
1997-05-19 02:00:16 +00:00
Brian Somers
a85412b4a5 Correct the files section for tunX.pid and ttyXX.if 1997-05-13 09:31:05 +00:00
Brian Somers
f2d6d31a91 Correct sample file name. 1997-05-12 11:54:12 +00:00
Andrey A. Chernov
63202ff1e6 Log each ppp line to separate /var/log/ppp.tunX.log instead mixing of
all lines into single /var/log/ppp.log
1997-05-04 02:39:04 +00:00
Brian Somers
07030d97c1 Add a reconnect capability directing ppp to re-establish
the connection after an unexpected loss of carrier:

    set reconnect timer ntries

The man page warns against using this command when your
timeout value is slightly more than the other sides :{}

Suggested by: burton@bsampley.vip.best.com (Burton Sampley)
1997-04-21 01:02:02 +00:00
Brian Somers
43ea9d19fa Make the next number redial ability configurable. The
"set redial pause [times]" command becomes
"set redial end-pause[.next-pause] [times]" and next-pause
defaults to 3 seconds.  This keeps things backwards
compatable.

Suggested by:	ache
1997-04-14 23:48:20 +00:00
Brian Somers
4ed9958f49 Make -background option attempt each phone number at most
once.  Make -background ignore redial.  Output exit value
to syslog with "PPP Terminated" message.
1997-04-13 00:54:45 +00:00
Brian Somers
c0139fb2e2 Only wait for the redial timeout when the last phone number in the
list has been dialed.  Alternate number dialing has no "pause".

Suggested by: joerg

Document this behaviour.  Document that the number of dial attempts
applies to the number of phone calls rather than the number of times
each number is dialed.  Add a missing .El.  Give a decent description
of how to connect to an ISP.
1997-04-12 22:58:41 +00:00
Brian Somers
9163ee5e9d Oops - forgot to document the new -HUP action.
This should make 2.2 if the HUP stuff (earlier today) does.
1997-03-13 21:39:41 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard
6d14e2a8e6 For /usr/sbin/ppp, you must choose between running ppp in the background or
connecting to a host immediately in the foreground.

I would like to be able to run ppp from a script so that my script can be
sure that it is connected to the 'net before it continues running:

  # Dial up the internet.
  ppp -background myprovider || exit 1

  do-some-net-command

  # Hang up the modem.
  kill -HUP `cat /var/run/ppp.tun0.pid`

Another problem is that the current ppp calls its process id file
`/var/run/PPP.server', which may conflict if you have more than one IP
tunnel interface available.

Closes PR#1469
Submitted by:	Gord Matzigkeit <gord@enci.ucalgary.ca>
1996-12-22 17:29:33 +00:00
Jordan K. Hubbard
17e762ca3d Make CRTSTS selection a runtime option. Closes PR#1392
Submitted by:	Mike McGaughey <mmcg@heraclitus.cs.monash.edu.au>
1996-12-22 17:09:17 +00:00
Jordan K. Hubbard
a9f484e520 The infamous IP aliasing code for ppp, modified to work as a runtime option
(otherwise ppp's behavior remains unchanged) and documented by myself,
Steve Sims, Nate Williams, Martin Renters and god-only-knows who else. :-)
Submitted by:	nate
Obtained from:	Charles Mott <cmott@srv.net>
1996-12-12 14:39:47 +00:00
Nate Williams
680026d67a Added my 'ddial' patches to user-PPP. The new mode tries it's darndest
to keep the link up, so it re-dials whenever it detects the link go
down.  This is useful for 'dedicated' links who use PPP.

It's been used for over a year w/out problems at different sites.
1996-12-03 21:38:52 +00:00
Joerg Wunsch
eea6c03c51 Improve the sample login script now that our sh(1) understands -p.
Closes PR # docs/1383: ppp(8) man page suggests using shell script...
1996-10-31 19:55:05 +00:00
Jordan K. Hubbard
d8e55738a0 Add support for the Evil Microsoft ppp extentions. Yes, they did it
on their own without even attempting to get concensus in the IETF, but
there are also lots of Win95/NT boxes out there.

CLoses PR#1494
Submitted-By: Peter Childs <pjchilds@imforei.apana.org.au>
1996-10-06 13:32:37 +00:00
Poul-Henning Kamp
9c749ffb8b Here is a diff of /usr/src/usr.sbin/ppp against current. The diffs
add some logging functionality which I find very useful.
'set debug link' will record just link up/down and address assignments.
'set debug connect' will record the entire chat dialog
'set debug carrier' will record just chat lines including 'CARRIER'
(so that I can be sure I'm getting a 28.8 line).

There was a global change required to permit LogPrintf to take a bit
mask instead of a bit position value (to permit logging some events
on either of two flags, so that no change in 'set debug lcp' would
result from the code supporting 'link'.  Thus the diffs are rather
long for such a small change.  The man page is also touched.

Oh, and there was a slight syntax problem in route.c

Reviewed by:	phk
Submitted by:	Tony Kimball <alk@Think.COM>
1996-05-11 20:48:42 +00:00
Mike Pritchard
9cdda9ab23 Xref chat(8) and pppd(8). Also change .It references to .Pa for file
name references in the file section.
1996-05-02 19:18:47 +00:00
Andrey A. Chernov
d91680ea37 1) Open /dev/null for std* after setsid() to be shure that modem is
*not* our controlling terminal (SIGHUP can coming in other case)

2) Add HUPCL for non-dedicated lines to be shure that modem
properly resetted.

3) Correct usage string.
1996-03-09 08:18:41 +00:00
Andrey A. Chernov
1dff3fc565 1) Add multi-phone dialing/redialing, several phones separated by ':'
2) Improve on-line help subsystem
3) Make 'term' mode works even carrier dropped (old code
close line forever here)
4) Make 'term' mode 8bit clean.
5) Improve manual page
6) #ifdef DEBUG diagnostic about missing optional files.
7) Don't put interactive dialing info to logfile
1996-03-08 09:03:09 +00:00
Mike Pritchard
4a8d02835c Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
Atsushi Murai
a9c6b5df9c 1. Add a settable redial timer and logging of the process id in a file.
A settable redial timer helps to avoid the problem where both ends
   of a link want to dial at the same time and the line winds up busy
   for both ends. The process id is logged in /var/run/PPP.system where
   system is the name of the called system.  When both ends of a link
   are running in demand dial mode, you need an easy way to get the pid
   of the ppp on the called end so it can be killed and re-started with
   -direct or pppd started to handle the incoming ppp session.

2. Add secret description for "set timeout" to man.

Reviewed by:	Atsushi Murai <amurai@spec.co.jp>
Submitted by:	John Capo <jc@irbs.com>
1995-10-08 14:57:32 +00:00
Nate Williams
aca3622c3f Completely re-wrote the man-page using -mandoc macros. More cleanups in
sentence structure to include more articles, plus fix some mis-spellings
and typos.

Reviewed by:	gpalmer (Gary Paler)
1995-09-24 18:15:14 +00:00
Atsushi Murai
f18846503d 1. All fragments (except the first one) of a fragmented packet were
dropped - devet@adv.IAEhv.nl (Arjan de Vet)
2. Will not read data from telnet connection - John Capo <jc@irbs.com>
3. Using LQM option could be drop the link due to LcpLayerDown() doesn't
   stop LQR timer. -  Brian <brian@awfulhak.demon.co.uk>
4. Allow to describe a syntax of filters that is not only port number
   but also by name in /etc/service. -  Rich Murphey <rich@lamprey.utmb.edu>

Reviewed by:	Atsushi Murai <amurai@spec.co.jp>
Submitted by:	devet@adv.IAEhv.nl, jc@irbs.com, brian@awfulhak.demon.co.uk,
		rich@lamprey.utmb.edu
1995-09-17 16:14:49 +00:00
Bruce Evans
21bbf8081b pred1' was documented as pred'. The problem was not obvious because
`disable pred' is silently ignored.
1995-06-26 08:04:16 +00:00
Jordan K. Hubbard
3a1426b521 Some edits suggested by Atsushi. Also remove my name from the bottom;
just because I edited it doesn't mean I should stick myself in the authors
line, even with the qualification I used.
1995-05-26 17:35:54 +00:00
Jordan K. Hubbard
438728425d A few more typos fixed and some general cleanup done. 1995-05-24 05:51:29 +00:00
Jordan K. Hubbard
18be8f143c Do my best to translate this into english.. :-)
Some parts were so incomprehensible that I had to excise them
entirely, but I did my best with the material provided.
1995-05-21 17:32:35 +00:00
Jordan K. Hubbard
c853fdb82d Change device name from cua01 to cuaa0. I'm going to use this doc in
the installation, so it was necessary.
1995-05-21 10:52:05 +00:00
Atsushi Murai
108136679f Adding GETTING START and so on.
Submitted by:	amurai@spec.co.jp
1995-03-12 12:03:48 +00:00
Atsushi Murai
ca2b8d6944 Add BUGS and few explanation.
Submitted by:	amurai@spec.co.jp
1995-03-11 16:36:30 +00:00
Atsushi Murai
53c9f6c0c4 New user Process PPP based on iij-ppp0.94beta2.
o Supporting SYNC SIO device (But need a device driver)
     - add "set speed sync"
   o Fixing bug for Predictor-1 function.
   o Add new parameter that re-sent interval for set timeout commands.
   o Improving RTT (Round Trip Time) and reducing processor time.
     - Previous Timer service was using polling, and now using
       SIGALRM ;-)
     - A 0.94beta2 will not work correctly....

   -- Follows are additinal feature not including 0.94beta2
   o Support Proxy ARP
     - add "enable/disable proxy" commands
   o Marging common routine in CHAP/PAP.
   o Enhancing LCP/IPCP log information.
   o Support local Authfication connection on port 300x and tty.
     - You can set up pair of your "hostname -s" and
       password in ppp.secret. if either ppp.secret file nor
       your hostname line don't exist, It will notify a message
       and working as same as previous version.(Backword compatibility)
     - If you did set up them, It's allow connection but nothing to do
       except help and passwd command.
     - add "passwd yourpasswd" commands
   o Support afilter - keep Alive filter that a packet can send/receiving
     according to ifilter/ofilter but doesn't count it as preventing idle
     timer expires.
     - Same syntax of other filters.
   o Fixing bugs reported by current user for previous one. Thanks !!

Reviewed by: Atsushi Murai (amurai@spec.co.jp)
1995-02-26 12:18:08 +00:00
Atsushi Murai
af57ed9fdc 1995-01-31 06:29:58 +00:00