Commit Graph

3851 Commits

Author SHA1 Message Date
Brian Somers
8e7b85992b o If there's a session leader left running for a descriptor
that we're now closing, manually HUP that session leader
  so that the tty is fully released.
o Always restart our carrier detect timer in the receiving
  process if it was running in the sending process (as we
  now *always* pass the descriptor).
o Tweak argv when we go into pause() mode to keep our session
  so that ps can see what's going on (without checking for a
  `pause' state in `ps -l').
1998-05-29 18:33:10 +00:00
Brian Somers
05dbe14bd3 Some documentation corrections & typo fixes.... 1998-05-29 18:32:41 +00:00
Brian Somers
81358fa3fc o Make modes consistent throughout ppp. The same strings are used
in `set mode', `allow modes', on the command line and when
  outputting mode names.  The strings are matched so that only
  enough characters to uniquely identify the string are required,
  so you can now

    ppp -a mylabel  (for auto mode)
    ppp -b mylabel  (for background mode)
    ppp -dd mylabel (for direct dial mode)

  etc.
o Make -ddial dial when specified on the command line (oops).
  Pointed out by: Alex <garbanzo@hooked.net>
1998-05-29 18:32:11 +00:00
Brian Somers
1662ac2427 srandomdev() isn't available in all 2.* versions. Only
use it for version 3 (-current) & up.
1998-05-29 00:03:00 +00:00
Brian Somers
1384bd27d8 o #define the name "tun" in defs.h against the future possibility
of supporting architectures with different device names.
o Close /dev/tunX when destroying the bundle.
o Don't forget to close the parent end of the pipe in the child
  process when exec'ing a program from a chat script.
o If we close our controlling terminal, ditch the current session
  with it, allowing getty(8) (or whatever) to regain control.
o After transferring our controlling terminal descriptor to another
  ppp instance, we now fork a new ppp to continue where we left off,
  transferring ownership of all uucp locks and the /var/run/tunX.pid
  file.  Meanwhile the parent closes all file descriptors, defaults
  all signals and does a pause() to wait for a HUP after the
  transferred descriptor is finally closed.
  We don't run /bin/cat any more (again!).

  Suggested by: bde

TODO: It seems clocal devices need their pause()d session leader
      to be given a manual HUP, as closing the last open descriptor
      doesn't do the job.
1998-05-28 23:17:51 +00:00
Brian Somers
85fd273a31 o Don't forget to close our transfer socket if we cannot
generate the data to transfer.
o Transfer uucp lock ownership for the transferred device.
o Don't assume we know the correct values of dev_is_modem and
  mbits after the transfer.
1998-05-28 23:15:40 +00:00
Julian Elischer
4a71a2e71b Use AF_LINK rather than AF_UNSPEC to set an ethernet multicast address.
This is obviously  not a terribly used function as it's apparently been
broken forever.
It IS possible that this fix is wrong and that the KERNEL is wrong
(in which case you should fix if_ethersubr.c) either way it certainly has more hope of
working now than before. I'd take it to 2.2 except that obviously no-one cares :-)
1998-05-28 07:31:30 +00:00
Brian Somers
0f78c7a7ea Don't assume stdout is a tty in interactive mode
Analyzed by: dmaddox@scsn.net (Donald J. Maddox)
1998-05-27 22:43:37 +00:00
Dag-Erling Smørgrav
068f8619d0 Typo police. '#ifndef lint' around CVS id. Don't use __progname in usage().
Submitted by:	Philippe Charnier <charnier@xp11.frmug.org>
1998-05-27 14:04:38 +00:00
Søren Schmidt
cabb97dcbf ELF preparation step 2:
Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
1998-05-26 20:12:56 +00:00
Brian Somers
6c92091027 o Only do the /bin/cat bit when we're transferring our ctty. 1998-05-25 10:37:02 +00:00
Steve Price
2a30154f05 Give correct times with old wtmp files.
PR:		4732
Submitted by:	Andrew Timonin <tim@pool1.convey.ru>
1998-05-25 05:21:29 +00:00
Brian Somers
54cd8e13c6 o Don't try to transfer tty device descriptors as there's no way of
transferring session rights with them.  Instead, create two
  `/bin/cat' processes.  A new child is spawned and disassociated from
  the terminal and the parent, which continues with the rest of the ppp
  process.  Meanwhile, the parent spawns another child, and both the
  parent and child exec the `/bin/cat' commands with the appropriate
  descriptors.  This way, the session is owned by the parent, and the
  tty is held open.
o Close LCPs that have done a TLF and are now in ST_STOPPED before
  calling Down.  This prevents them from trying to come back up again
  after the peer has shut them down (it seems a bit strange that the
  rfc says that a Down in ST_STOPPED will cause a TLS etc).
o Don't try to set the physical link name pointer when we're receiving
  and renaming a datalink.  The physical hasn't been created yet, and as
  it happens, the garbage physical pointer happens to be the value of another
  physical - so we're pointing that other physical name at ourselves.
  yeuck.
o Re-arrange the order of things in main (DoLoop()).  We now handle
  signals only after the select and not before the UpdateSet.  It's
  possible that either a signal (FSM timeout) or a descriptor_Read()
  brings a link down, after which we'd better tidy up any dead direct
  and 1off descriptors before calling UpdateSet() again.
o Mention when we detect a PPP packet when we see one before the link
  is up (then start LCP as before).
1998-05-25 02:22:38 +00:00
Jordan K. Hubbard
515cf34afd Merge updates from 2.2 1998-05-24 20:01:33 +00:00
Jordan K. Hubbard
904bdc094f Sync documentation with 2.2 updates. 1998-05-24 20:00:27 +00:00
Steve Price
d1f6f82db6 Fix Anders Email address. 1998-05-24 19:48:38 +00:00
Steve Price
1c74efeecf Add a fuller-featured Norwegian keycap entry.
PR:		6173
Submitted by:	Anders Nordby <nickerne@nome.no>
1998-05-24 19:37:43 +00:00
Dag-Erling Smørgrav
83bc6a1106 Add chkgrp, a small utility for checking for syntax errors in group
files.

PR:		bin/1387
Suggested-by:	Giles Lean <giles@nemeton.com
1998-05-24 15:09:23 +00:00
Dag-Erling Smørgrav
2c8d830407 Add chkgrp 1998-05-24 15:07:04 +00:00
Steve Price
b7350d720d Loosely document the '-s' commandline option.
PR:		6713
1998-05-24 03:11:17 +00:00
Steve Price
461497b337 Add 'newsyslog.conf' to the list of files to not clobber
during the upgrade process.

PR:		6629
1998-05-24 02:49:54 +00:00
Brian Somers
d4156d002c Show the link mode in `show links'. 1998-05-23 22:28:19 +00:00
Brian Somers
0438ce3a88 Oops - patch failed in last commit ???? 1998-05-23 22:27:53 +00:00
Brian Somers
0f2f3eb395 o Move our prompt descriptor list outside of the bundle.
It's now dealt with by the `server' object.  This simplifies
  things as we only have one list of prompt descriptors and
  the log_ routines check prompt::logactive to determine
  whether it should be used for output.
o Include the MP socket UpdateSet() result in bundle::UpdateSet().
o Don't select on the tun device unless we're in NETWORK
  phase or AUTO mode.
o Stop the idle timer when we go to DEAD phase.  We may
  have transferred a link and not had a chance to kill
  it.
o Don't fail when trying to unlink our transferred datalink
  from our descriptor lists just before the transfer.
o Add our link descriptor to the write set if we got a short
  write the last time (physical::out is set).
o Log the connection source address when a connection is closed.
o Remove descriptor::next field.  Descriptor lists are not required
  any more.
1998-05-23 22:24:50 +00:00
Brian Somers
86b1f0d762 o Make sure we adjust our min seq and process any outstanding queued
incoming fragments when a link goes down.
o Don't use the minimum sequence numbers of links that aren't open.
o Understand sequence number wrapping when determining the minimum
  sequence number.
o Add & adjust a few comments.
1998-05-23 17:05:28 +00:00
Brian Somers
1df0a3b93b o If all CCPs are disabled & denied, don't send a REQ - just enter
STOPPED state waiting for the peer to say something.
1998-05-23 13:38:09 +00:00
Brian Somers
87f6044a4b Don't give .It too many args. 1998-05-21 23:45:10 +00:00
Brian Somers
4dfb0c50d6 Remove -Wpointer-arith 1998-05-21 23:38:08 +00:00
Brian Somers
dadabc45a7 o Add some missing #includes
o Calculate base device name correctly.
1998-05-21 22:55:08 +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
641684cdba Don't accept IPCP packets before NETWORK phase.
Pointed out by: Ralf Rutherford <ralf@philips.oz.au>
1998-05-21 01:26:10 +00:00
Brian Somers
04eaa58c59 o Add `set autoload'. You can now set the minimum and maximum
thresholds (in terms of queued packets for a period of time)
  where -auto links will be brought up and down.  By default,
  all auto links come up when we reach NETWORK phase and never
  go down.
o Display current autoload state in `show bundle'.
o Disable the idle timer as soon as it's called.
o Disable the idle and autoload timers when exiting (in case
  we're abending).
1998-05-21 01:13:32 +00:00
Brian Somers
1fa75dc107 o Set utmp::ut_host to getenv("CONNECT"). Mgetty sets
this to the connection speed.
  Submitted by: forgotten (sorry)
o Use all UT_LINESIZE characters rather than leaving the
  last one NUL.
1998-05-21 01:12:20 +00:00
Brian Somers
03704096ad Don't bring the interface down with the last link when we're
in -auto mode (broken a few commits ago).
1998-05-19 23:05:10 +00:00
Brian Somers
0f8037a9db Close some file descriptors.
Pointed at by: Ruslan Ermilov <ru@ucb.crimea.ua>
1998-05-19 21:51:24 +00:00
Brian Somers
0e8f716d37 Close forgotten descriptor.
PR: 6690
Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
1998-05-19 21:49:54 +00:00
Peter Dufault
66ed4bce19 Treat RTP_PRIO_FIFO the same as RTP_PRIO_REALTIME for status display. 1998-05-19 20:52:31 +00:00
Brian Somers
368da0a94a o Indicate which commands require context and which have optional
context in the `help' text.
o Remove some redundant code.
o Fix some comments.
1998-05-19 19:58:21 +00:00
Poul-Henning Kamp
76aba7e431 Remove a bogus dependency on the size of the inkernel msgbuf.
This change is likely to introduce a few linebreaks in the boot
messages, but that is not easy to solve without breaking syslogd
semantics.  Maybe the right  fix is to return an integral number
of lines from the kernel driver.

Noticed by:	dg
1998-05-19 12:02:41 +00:00
Brian Somers
6a5f81994e Talk about multilink ppp 1998-05-18 23:24:24 +00:00
Jonathan M. Bresler
a15417e7cf replaced check_rcpt ruleset with one
recommended by Gary Palmer <gpalmer@freebsd.org>
Obtained from: http://www.informatik.uni-kiel.de/%7Eca/email/check.html#check_rcpt
1998-05-17 22:58:51 +00:00
Brian Somers
332b9de01f Check the MP server in bundle_IsSet(). 1998-05-17 10:16:14 +00:00
Brian Somers
61bd517d00 Don't log the password in ``set server''. 1998-05-16 23:47:41 +00:00
Brian Somers
58d5533465 Add the `rename' command for renaming links. 1998-05-16 23:47:28 +00:00
Brian Somers
b102f4bc26 Always add! all sticky routes in route_Change so that
``set mode ddial'' followed by ``set mode auto'' removes
and re-adds all routes as expected.
1998-05-16 21:19:00 +00:00
Brian Somers
dd0645c5b7 o Add the `set mode' command for change a links current mode. It
is not possible to switch to or from dedicated or direct mode,
  but all other combinations are ok (eg. -auto -> -ddial).
o Cope with the fact that commands with optional context may not
  be able to obtain a link with command_ChooseLink() (if all links
  have been deleted for example).
o Allow `clone'ing in non-multilink mode.  We may for example want
  to configure two links in unilink mode and dial them both, using
  the one that comes up first.  It's also possible to rename
  ``deflink'' by cloning it, deleting the original, then setting
  the mode of the new link.
1998-05-15 23:58:30 +00:00
Pierre Beyssac
40907429e4 Small typo in T/TCP patch ("speicfy" -> "specify"). 1998-05-15 19:16:35 +00:00
Brian Somers
ea7229694b o Call bundle_LinkClosed() when transferring a datalink so that
the bundle has the opportunity to go PHASE_DEAD and cleanup
  the interface (if it's the last link).
o Regnerate our phys_type value when we transfer the link.
o Always clean up the interface when destroying our bundle in case
  we're abending.
o Always clean up our interface when the last link is gone rather than
  delaying things 'till exit time in the -direct case (the interface
  is useless anyway).  Do this *after* slamming down our NCPs (if
  they're still around).
o Our MP server descriptor now clears the relevent device descriptor
  from our descriptor [fd]sets when a datalink is on death-row (to
  be transferred to another running ppp), thus avoiding the possibility
  of passing a bum descriptor to select() and having ppp abend.
o Handle the MP socket descriptor functions from within the bundle
  descriptor functions.  Now we ensure that the MP socket descriptor
  functions see the descriptor sets *after* they've been seen by our
  datalinks.
o Add/fix a few more comments.
1998-05-15 18:21:45 +00:00
Brian Somers
0a1b5c9d9e o Activate link-level CCPs in multilink mode, by bringing them
into the ST_STOPPED state.
o Allow an optional ccp|lcp argument to `down'.  The default is
  still lcp (as before).  You can now call down with no context
  in multilink mode, in which case it'll down the multilink ccp
  or the entire bundle (*very* rude).
o Allow an optional `!' after `close ccp' (close ccp!) to tell
  ccp to stay in the CLOSED state after the terminate ACK.  The
  default is now to re-enter STOPPED so that the peer can bring
  the layer back up if desired.
o Always handle proto-compressed packets, even if we've agreed
  (in LCP) that the peer will not send us 1 byte protocols.
  If the peer violates the LCP agreement, log it to the HDLC
  log.
o Fix some comments.
1998-05-15 18:21:12 +00:00
Guido van Rooij
c6c38f1d7f On request of Garrett, ad a way to specify that a service should be
reachable via T/TCP
Reviewed by:	Garrett Wollman
1998-05-14 20:26:16 +00:00