Commit Graph

3895 Commits

Author SHA1 Message Date
Bruce Evans 6543414337 Fixed gross errors in previous commit. `sapipe' was used uninitialized
to attempt to unblock SIGCHLD, but we actually want to unignore SIGPIPE.

Obtained from:	OpenBSD

Finished conversion from sigvec to sigaction (don't assume that sa_mask
is a scalar...).  Didn't convert from sigblock to sigprocmask.  Didn't
fix missing error checking for sigaction...
1998-05-11 12:11:59 +00:00
Jordan K. Hubbard 9b6f1a185f Make Mitsumi and Sony CDROM devs also use the `a' device. I think
they'll have (or are having) similar problems to those described
for the matcd device in PR#6576
1998-05-11 00:47:27 +00:00
Jordan K. Hubbard 92be7163cc It was incorrect to use the `c' device for the matcd driver;
apparently, unlike the IDE or SCSI CDROM drivers, this is magically
special-cased for audio CDs.  This also might explain what happened
with scd (Sony) CDs also since I made the same change there.  A follow-up
commit will fix that. Thanks, Dave!

PR:		6576
Submitted by:	Dave Marquardt <marquard@zilker.net>
1998-05-11 00:45:06 +00:00
Brian Somers 24989c68ac o Protect against expected NULL fdset pointers.
o Log FD_SET()s in LogTIMER.
o Identify the descriptor that causes an EBADF from select()
  if LogTIMER is enabled (then exit).
o Call the MP server UpdateSet() function after calling
  the UpdateSet() for all links - the link may enter
  PHASE_TERMINATE and bring down the MP server - breaking
  the imminent select().
1998-05-10 22:20:20 +00:00
Tim Vanderhoek b2805b78b6 1) kill -HUP syslog, even if compressing supposedly "binary" files
PR:	docs/6385

2) -n (noaction) does not imply -r (run as non-root), since as of
   Rev. 1.12 (ache), -r changes actual behaviour.

3) missing \n from if(noaction) messages.
1998-05-10 21:13:29 +00:00
Tim Vanderhoek 28a9b05b87 Arg! Someone fixed the synopsis in -stable's newsyslog.8, but not
in -current.  However, they fixed both the ordering and the missing -F
flag.  Merge from 22 and fix ordering here, too.
1998-05-10 19:04:06 +00:00
Tim Vanderhoek b813e9a54a Fix the usage here, too (-F option).
Typo fix in comment ("Force the tim now matter what" s/tim/trim/)
1998-05-10 18:47:50 +00:00
Tim Vanderhoek cd6f8bd276 1) Remove a line that somehow strayed from the one true path of
its sentence.
2) Fix usage (-F option).
1998-05-10 18:41:16 +00:00
Bruce Evans 930ef4e26d Removed bogus dependencies of generated .c files on generated headers. 1998-05-10 16:03:17 +00:00
Bruce Evans 330698829e Fixed missing dependencies on headers generated by rpcgen, as usual.
Removed bogus dependencies of generated .c files on generated headers.
Sorted sources lists.
1998-05-10 16:01:36 +00:00
Bruce Evans 959bcb5329 Simplified by putting all generated headers in SRCS. The explicit
dependencies on *.o were complete, but this was not obvious.
1998-05-10 15:48:54 +00:00
Bruce Evans 5e97204684 Use rpcgen's -C option to get prototypes in nfs_prot.h. 1998-05-10 15:16:04 +00:00
Brian Somers e8607d386f Don't `clone' links with existing names. 1998-05-10 10:21:11 +00:00
Brian Somers 52ff8cacf6 Allow /nn specifications in the `add' command.
Suggested by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>

It's now possible to

  add myaddr 127.0.0.1		(add myaddr 255.255.255.255 127.0.0.1)
  add hisaddr/24 hisaddr	(add hisaddr 255.255.255.0 hisaddr)
  add 0 hisaddr			(add 0 0 hisaddr)
  add default hisaddr		(add 0 0 hisaddr)
1998-05-10 09:26:21 +00:00
Brian Somers c0d9a87722 When transmitting link file descriptors in multilink mode, ACK
our received file descriptor, and don't close a sent descriptor
'till the ack has been received.
1998-05-09 14:44:11 +00:00
Brian Somers 9ae588829e Log datalink state transitions consistently. 1998-05-09 13:52:12 +00:00
Bruce Evans 48ef4329ab Fixed the usual dependency bugs. This Makefile accidentally usually
worked for `make -j9', but failed for `make -j4'.
1998-05-09 13:32:37 +00:00
Bruce Evans 6f6040ffb1 Fixed `make -j9' by putting generated headers in ${SRCS}. Removed bogus
dependencies of generated .c files on generated headers (these made
`make -JN' work provided `depend' was made first).  Sorted sources lists.
1998-05-09 11:32:43 +00:00
Guido van Rooij e523d5ae25 Unblock SIGPIPE before execv(); convert from sigvec to sigaction
Obtained from: OpenBSD
1998-05-08 19:15:44 +00:00
Brian Somers 846af6dc99 o When specifying the diagnostic port (`set server'), replace
the first ``%d'' in the unix-domain socket name with the
  current interface unit number.  In the case of tcp ports, allow
  a ``+'' prefix to add the unit number to the specified port
  number.
o Remove all mention of SIGUSR1 (was already #ifdef'd out).  We
  can't create diagnostic sockets on-the-fly with a signal any
  more because there's no way of specifying the password without
  confusing matters with the previous ppp.secret scenario.
1998-05-08 18:50:24 +00:00
Brian Somers b3e3e12ed9 Make the `link' and `clone' commands understand a comma-separated
list of links, and make `link' understand `*' for all links.  This
allows (for example):

  clone 1,2,3,4,5
  link 1,3 open
  link 2,4,5 rm
  close
  link * rm
1998-05-08 18:49:59 +00:00
Brian Somers b7c5748e5e o Rename datalinks as soon as the name has been received so that
LQM and HDLC timer diagnostics come out with the correct name.
o Don't send an LQR immediately upon reviving a datalink.  Leave
  it 'till the next timeout.
o Add the link name to some more LQR diagnostics.
o Break out of the main loop when a descriptor exception is seen
  in select().
o Remove the evil nointr_[u]sleep() functions.  Timers should be
  (and are) used instead.
o Treat a read() of 0 bytes as an error that's fatal to the link
  on which the read() is done.  We should never read() 0 after
  select() says there's something there - not unless the link
  has been closed by the other side.
o Write the data seen before a HDLC header to the terminal in
  `term' mode, *not* back to the modem :-/
o Initialise our transmitted file descriptor before starting any
  timers.
o Only send data links that have *no* pending output data.  This
  means that our final ACK will be written rather than being
  nuked with the datalink transmission.
1998-05-08 01:15:19 +00:00
Guido van Rooij 34b32a7cb4 Redo tcpmux stuff. tcpmux handling is now performed after inetd
forks. Furthermore, invalid input for tcpmux does not lead to
an exiting inetd.
This patch is recommended for people running tcpmux (which is NOT
enabled by default)
1998-05-07 18:32:00 +00:00
John-Mark Gurney 2dff393b54 fix a core dump problem when you don't give -f a parameter... also compare
results of strcmp against 0 instead of !'ing results...

Closes PR: 6538
1998-05-07 14:13:16 +00:00
Brian Somers a95587674c Make syslogd function in non-secure mode.
Log the correct ^2 packet as per the last commit comment.
1998-05-07 00:39:56 +00:00
Brian Somers faefde08e0 Categorize the fields in struct bundle, and make the tunnel
device speed available in ``show bundle''.
1998-05-06 23:50:25 +00:00
Brian Somers b4b280abef o Behave correctly when short sequence numbers are denied.
o Determine if one seq is less than the other correctly,
  given the point at which they wrap (again).
1998-05-06 23:49:48 +00:00
Brian Somers 84917b87ba Log link name changes correctly. 1998-05-06 23:49:33 +00:00
Brian Somers 1bc9b5ba84 o Make sure we don't dereference NULL when we've lost all our links.
o Use srandomdev() for __FreeBSD__ >= 2, not just >2.
o Use srandom((time(NULL)^getpid())+random()), random() when we
  haven't got srandomdev().
1998-05-06 18:50:12 +00:00
Brian Somers 078c562e54 o Don't enter phase TERMINATE in the LCP TLD, leave it exclusively
for the last NCP TLF.
o Move tun reading from the main loop into the bundle descriptor
  handling routines.
o Cosmetic: Add a few `const's and make some diagnostics clearer.
1998-05-06 18:49:45 +00:00
Bruce Evans 34a4b6b422 Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:27:57 +00:00
Bruce Evans 0a79d73835 Backed out previous backout.
Added y.tab.h to SRCS.  Dependencies on it were missing until recently.
1998-05-06 15:23:53 +00:00
Bruce Evans d15d315c11 Use `foo/bar.a' instead of `-Lfoo -lbar' for linking to static internal
libraries, so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Use `DIR!= cd ...libbind; make -V .OBJDIR' to find libbind's object dir
if it doesn't seem to be in its usual place relative to ${.OBJDIR}.
This fixes `cd /usr/src/usr.sbin/nslookup; mkdir obj; make'.
1998-05-06 13:23:39 +00:00
Jordan K. Hubbard ddb437cf93 XFree86 3.3.1 -> 3.3.2 1998-05-06 12:01:20 +00:00
Brian Somers 183df580c7 Don't allow duplicate sticky routes. 1998-05-06 00:38:55 +00:00
Brian Somers 610b185f37 Create `struct sticky_route'.
Any `add' or `delete' command that uses MYADDR or HISADDR
will be added to the sticky route list (show ipcp).  When
MYADDR or HISADDR change due to IPCP negotiations, and if
`sroutes' is enabled (the default), all sticky route
entries are updated in the routing table.

The end result is that `add default hisaddr' will ``stick'',
as will ``add myaddr 255.255.255.255 127.0.0.1'' and
``add 1.2.3.4 255.255.255.0 hisaddr''.
1998-05-05 23:30:13 +00:00
Dag-Erling Smørgrav 7e5ee0f5eb Fix the search sequence for keymaps.
PR:		bin/6522
Submitted by:	Rudolf Cejka
1998-05-05 19:02:01 +00:00
Bruce Evans a9e1ae4a62 Don't generate y.tab.h, since it is not used. 1998-05-05 13:19:13 +00:00
Bruce Evans de1d4a81ee Added y.tab.h to SRCS. This should have been used to get dependencies
on y.tab.h generated.  It will soon be used to tell bsd.dep.mk that
y.tab.h itself needs to be generated.
1998-05-05 13:16:35 +00:00
Bruce Evans e43e36af7d Backed out previous commit. It was tested, but not for the case where
a separate object tree doesn't exist.  Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
1998-05-05 07:36:55 +00:00
Bruce Evans b076686781 Backed out previous change. Generating vgaio.h from vgaio.y clobbered
the source file vgaio.h, and y.tab.h is used so we can't simply avoid
generating the yacc header.
1998-05-05 06:52:09 +00:00
Brian Somers eeab6bf510 o Use a tun speed of 115200 for each network link.
o Display the link weight in `show links', and only
  show throughput for open links.
1998-05-05 03:01:32 +00:00
Brian Somers 1bcced10ad Allow a 1000 fragment sliding window when placing a new fragment
in our inbound multilnk queue.  This fixes wrapping problems when
something arrives out-of-sequence.
1998-05-04 21:42:41 +00:00
Bruce Evans b681d90662 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
Bruce Evans dd8eff227e Simplified by using new lex rules. 1998-05-04 20:00:14 +00:00
Bruce Evans 3e75029a9b Simplified by using new yacc rules. 1998-05-04 19:54:56 +00:00
Bruce Evans caee217652 Simplified by using new lex and yacc rules. 1998-05-04 19:40:12 +00:00
Brian Somers 59acc91778 Keep DPADD and LDADD consistent. 1998-05-04 03:01:34 +00:00
Brian Somers 147613eadf o Increment expected MP fragment numbers correctly,
according to SHORTSEQ negotiation.
o Don't forget to attach incoming fragments with a
  number greater than everything else in the queue
  (rather than leaking memory).
o Output the link name with the ``other'' hdlc
  diagnostic message.
o Correct a VJ diagnostic (`COMPPROTO', not `proto').
1998-05-04 03:00:09 +00:00
Brian Somers 9c53a7b1c5 o Display current link throughput in `show links' (assuming
throughput measurement is enabled).
o Load balance the links based on weight *and* on a round-robin
  basis.  This makes things fairly even on an output basis.  We
  don't try to allow for the peer sending all his data down one
  link (and try to send ours back up the other).
o Show the number of pending input buffers that can't be processed
  in ``show mp''.
o Fix a typo in the man page.
1998-05-03 22:13:14 +00:00
Brian Somers 6e7cdde1a2 o Mention our link name with timed HDLC error reports.
o Switch off our carrier detect timer if we don't have
  CD after logging in.
o Maintain our CD timer after a link transfer.
1998-05-03 11:24:16 +00:00
Peter Wemm eb5a057406 Put named-bootconf (the script to convert named.boot to named.conf) in
/usr/sbin rather than in /etc/namedb (make install isn't supposed to touch
/etc)
1998-05-03 05:25:09 +00:00
Peter Wemm d12e99bb93 Add nsupdate 1998-05-03 05:17:28 +00:00
Peter Wemm f0b57f8b59 Update for bind-8 1998-05-03 05:16:58 +00:00
Peter Wemm 1f1b520f7f Update for bind-8. Also use /proc in preference to the (seemingly) always
broken ps(1).
1998-05-03 05:14:04 +00:00
Peter Wemm 32112b0956 These are no longer shipped with bind, but are a well established
interface that's simple to maintain.
1998-05-03 05:11:52 +00:00
Peter Wemm 7193f43e18 New bind8 program 1998-05-03 05:10:23 +00:00
Peter Wemm e730bbed7e Update for named v8 1998-05-03 05:09:13 +00:00
Bruce Evans ccee498fca Backed out previous commit. chown(8) doesn't follow symlinks by
default, at least in BSD.  This used to be automatic, because chown(2)
didn't follow symlinks.  When chown(2) was changed to follow symlinks
in BSD4.4, chown(8) was changed to not follow symlinks by default.
The previous commit broke this.  The first victim was bsd.prog.mk,
which uses a plain chown in an attempt to change the ownership of the
symlinks to `dm' in /usr/games.  This fails when it is done before
dm is installed, or messes up the ownership of dm if dm is installed.

Unfixed problems:
1. When lchown(2) was implemented, chown(8) wasn't changed to implement
   the historical behaviour of changing ownership of symlinks.  I'm not
   sure if it should have been.  The -HLP options give more complete
   control, but they unfortunately don't apply unless the -R option is
   specified (a problem shared with other commands, e.g., cp; I guess
   we're supposed to use -R even for non-recursive traversals).
2. If we implement the historical behaviour, then -h would become a no-op
   and should be left undocumented.
3. The man page suggests that without option -h, all symlinks (to files
   specified in the command line?) are followed.  It's not clear what
   "the file" is.  These bugs were introduced when -h was documented.
4. The correct interaction of -h with the other flags is not clear.
1998-05-03 04:17:48 +00:00
Brian Somers 96c9bb21aa o Transfer file descriptors using {send,recv}msg & SCM_RIGHTS,
using the scatter/gather array to transfer the link
  information.  The whole link is now passed in one message.

This is far better than the two `/bin/cat' processes per additional
link :-)  I remember years ago thinking that file descriptor
transferral would be a really amazing facility !

Suggested by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
         and: Eivind Eklund <eivind@yes.no>
1998-05-02 21:57:50 +00:00
Wolfgang Helbig 3dd0615ba4 Don't ignore symbolic links in the absence of -h, -H or -L options.
Instead change the user ID/group ID of the file that the link points to.
1998-05-02 12:57:57 +00:00
KATO Takenori c090df3958 Support PC-98 machine. 1998-05-02 01:57:39 +00:00
Brian Somers b1ac9332fd o Mention the ``timer'' log in the man page.
o Remove an escaped mention of ``carrier'' logging.
o Alphabeticalise timer logging in the log list.
1998-05-01 22:39:38 +00:00
Brian Somers c0fd19f856 Pathnames.h is no longer required. 1998-05-01 19:27:15 +00:00
Brian Somers dd7e261079 Cosmetic: Make our external function names consistent. 1998-05-01 19:26:12 +00:00
Brian Somers 40f1c018aa Remove pppmpipe - it's not required now that MP ppp uses `at'. 1998-05-01 19:22:49 +00:00
Brian Somers b762af4f95 o Explicitly set the close-on-exec flag of descriptor 3 before
exec()ing.  Tidy up file dups in general prior to exec().
  This prevents our tun device (fd 3) from staying open (and
  configured) despite handing off all it's links and exiting
  (because ``cat'' holds it open).
o Don't bother SIG_DFL'ing signals before exec() as they're
  already trapped with specific handlers and will be handled
  correctly by the exec.
o Use values from paths.h for "/dev/" and "/dev/tty".
o Don't assert() in physical.c.
1998-05-01 19:22:23 +00:00
Brian Somers 47723d29e5 o Use two `cat' processes to connect the modem to an
already-running ppp.
  Suggested by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
o Use _PATH_DEVNULL rather than "/dev/null"
o Be more paranoid about nuking running timers when
  transferring links.
1998-05-01 19:20:09 +00:00
Bruce Evans 91d56ec1d0 Undouble. 1998-05-01 15:51:23 +00:00
Bruce Evans 2be57ccd0c Removed self-inclusion-prevention ifdef. It is unnecessary now that
bsd.man.mk doesn't include ${.CURDIR}/../Makefile.inc.
1998-05-01 15:39:46 +00:00
Peter Wemm 732aba2af7 Don't give examples or use the depreciated usage to nfsd
PR: 5635
1998-05-01 13:45:04 +00:00
Brian Somers 6f38457323 o Create a new ``timer'' log level. This lets us ``set
log debug'' without filling our filesystem/screen with
  junk that we don't really want to see.
o change PHYS_STDIN to PHYS_DIRECT - we can handle incoming
  connections that aren't on STDIN_FILENO now.
o Allow return values from our FSM LayerUp functions.  If
  LayerUp() fails, the FSM does an immediate FsmDown() without
  calling the fsm_parent's Layer{Up,Down} functions.
o Clear the close-on-exec flag of file descriptor 3 when executing
  chat programs so that our documented ability to communicate with
  /dev/tty via that descriptor works.  Also document it as
  descriptor 3, not 4 :-O
o Allow a ``rm'' command as an alias for ``remove''.
o Fix the bind()/connect()/accept() calls made by the MP server.
o Create bundle_SendDatalink() and bundle_ReceiveDatalink().
  This allows `struct datalink's to flatten themselves, pass
  through a pipe (read: the eye of a needle !) and come alive
  at the other end.  The donator then fork()s & exec()s pppmpipe,
  ``passing'' the connection to another ppp instance.

   *** PPP NOW TALKS MULTILINK :-))) ***

Our link utilization is hideous, and lots of code needs
tidying still.  It's also probably riddled with bugs !
It's been tested against itself only, and has hung once,
so confidence isn't high....
1998-04-30 23:53:56 +00:00
Brian Somers 9c281ab21b Don't forget to set up our ppp.secret IP numbers & label
in non-MP mode.
1998-04-30 23:52:53 +00:00
Brian Somers 97fec20198 Create ``pppmpipe''.
This is a *very* small program that acts as a pipe between
stdin & stdout.
1998-04-30 23:51:51 +00:00
Bruce Evans 607b5242b2 Fixed syntax error for `make checkdpadd'. libfl.a should never be
used.  ${LIBFL} is set to a weird value in an attempt to inhibit
its use, but only breaks properly in some contexts.

Fixed the usual style bugs for DPADD and LDADD (disorder, and += for the
initial assignment).
1998-04-28 05:31:41 +00:00
Brian Somers 1fa665f5b3 o Add the link name to modem diagnostics.
o Create struct mpserver as part of struct mp.
  mpserver creates a unix-domain socket based on the
  peers auth name and endpoint discriminator.  If it
  already exists, ppp will ``pass the link'' over to
  the owner of the socket, joining it into the bundle
  of another ppp invocation, otherwise ppp waits for
  other invocations to pass it links through this
  socket.
  The final piece of code will be the code that flattens
  our datalink info and passes it down this channel
  (not yet implemented).
1998-04-28 01:25:46 +00:00
Brian Somers 107d62e7ac o Don't limit our tun device number to 256. As long as there's
another /dev/ entry, keep trying to open them.
o Don't allow ``open ccp'' if lcp isn't open.
1998-04-27 01:40:38 +00:00
Bruce Evans 22450dd8c1 Fixed `make -j9' by putting generated headers in ${SRCS}. Removed bogus
dependencies of generated .c files on generated headers (these made
`make -JN' work provided `depend' was made first).  Sorted sources lists.
1998-04-26 16:31:14 +00:00
Tor Egge dae3e4e603 Don't clobber errno when reaping child processes. 1998-04-26 01:00:00 +00:00
Tatsumi Hosokawa 9b473222be Keywords "iosize" and "memsize" are unused since 1.5. Removed. 1998-04-25 18:10:10 +00:00
Tatsumi Hosokawa af5311ffe2 #define'd KWD_XXX for keywords. 1998-04-25 17:52:15 +00:00
Brian Somers e43ebac1c2 Make gcc-2.8.1 build ppp cleanly.
Support OpenBSD again.
1998-04-25 10:49:52 +00:00
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 9592529e9d Use the link name for modem throughput logging. 1998-04-25 00:09:28 +00:00
Brian Somers 184d1da22a Show our link name when we fail to mp_Up(). 1998-04-25 00:09:22 +00:00
Brian Somers 50abd4c820 Make ``show ipcp'' prettier and remove a few redundant includes. 1998-04-25 00:09:14 +00:00
Brian Somers 259a619199 Choose the correct IP number in ``set enddisc {ip,mac}''. 1998-04-24 19:16:20 +00:00
Brian Somers 643f49047e o Defer setting up pap/chap based IP numbers & labels until after
we've determined if we're going to join another ppp invocation.
o Make ``show link'' show all link details, and ``show links''
  just give a list of links and their current status.
o Show our current label in ``show bundle''.
o Allow link cloning and removal as soon as our MRRU is set.
o Make ``show lcp'' require context as nothing will ever change
  in our MP LCP (it's auto-configured as per rfc1990).
o Initialise our LQM owner in hdlc_Init().
o Store our endpoint discriminator and authentication name at both
  the datalink and multilink level and compare them when we've
  finished AUTHENTICATE phase and before entering NETWORK phase.
  If they don't match, close the link again.
  Display the information in the appropriate ``show'' command.
o Initialise datalink::phone and datalink::fsmp.object properly
  when we're cloning the link.
o Show which link we're passing LQRs on in our diagnostics.
o Reject endpoint discriminator REQs at the logical multilink
  level.
o Remove the rest of our CARRIER and LINK logging setup.
1998-04-24 19:16:15 +00:00
Brian Somers d47dceb8ab o Remove LINK level logging.
o change the default link name to ``deflink'' rather
  than ``default''.
o Prepend the link name to CCP and LCP FSM diagnostics.
o Protect against 0 length options in CCP and IPCP REQ
  interpreters (already done for LCP).
o Allow optional context for the `show' command.
o Use MPs link when interpreting commands if the multilink
  mrru is configured rather than when multilink is active.
  This means that once we've ``set mrru xxx'', we then need
  to ``link deflink show ccp'' etc if we want to do link-level
  stuff (based on the command requiring optional or manditory
  context).
o Use the ifconfig'd interface address in `set enddisc {ip,mac}'
  if it's there, otherwise the configuration file value.
1998-04-24 19:15:48 +00:00
Brian Somers ed32233ca5 Output the correct protocol id from the physical link-level CCP
layer when we're in multilink mode.
1998-04-24 19:15:26 +00:00
Poul-Henning Kamp c46308e85c Augment the last change after some deliberation with rgrimes & peter.
It is important that we keep the ability to send packets to a remote
server and that the packets come from our well-known port, also in
that case.

Reviewed by:	peter, rgrimes.
1998-04-24 17:32:23 +00:00
Brian Somers 086760227f Create #defines for all endpoint discriptor classes,
and allow `set enddisc mac'.
1998-04-23 23:50:40 +00:00
Brian Somers 673903ec42 o Initialise MP correctly depending on if we're the
first link in mp_Up().
o Bring MP and its CCP down when we enter phase TERMINATE,
  and ditch everything in the incoming packet queue.
o Enable MRRU negotiation.  Now, we can multilink
  mode, but only with one physical link.
o Close the link if the peer PROTO REJs PROTO_MP.
o Prepend our protocol before passing a packet to
  struct mp for fragmentation.
o Log info messages to DEBUG, not ERROR (oops).
o Align `show mp' output (again).
1998-04-23 21:50:13 +00:00
Dag-Erling Smørgrav d35f47a331 There is no "rwho" service, it's "who"
PR:		bin/6396
Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1998-04-23 19:12:41 +00:00
Brian Somers 6e3ef61465 Get the alignment right in ``show mp''. 1998-04-23 18:58:04 +00:00
Brian Somers ce828a6ecc o Add ipcp_SetLink() for attaching IPCP to the correct link, and
call it after link authentication.
o Pretty print our bundle MTU.
o Correct MP header encoding and decoding (should be network byte order).
o Add some debug diagnostics so that we can see MP fragment sending and
  re-assembly.
1998-04-23 18:56:21 +00:00
Brian Somers 789de69642 Mention how to set an ACCMAP for ^Q & ^S. 1998-04-23 18:56:00 +00:00
Brian Somers dbf60d74f8 o Don't go multilink if the peer hasn't asked for it
o Don't go multilink if the peer hasn't agreed
o When negotiating multilink, don't try to push the peers
  MRU up according to our `set mtu' setting.  Instead, accept
  whatever MRU they want and push their MRRU up instead.
o When *not* negotiating multilink, REJ short sequence number
  REQs.
1998-04-23 18:55:50 +00:00
Bruce Evans 5ad02d9ef4 Don't generate code with syntax errors (hard newlines in string constants
in config.c).
1998-04-23 16:37:06 +00:00
Brian Somers 49052c9523 Negotiate MRRU, SHORTSEQ and ENDDISC. ENDDISC doesn't imply
multilink ('cos I've seen my ISP REQ it without multilink).

Setting MRRU is ifdef'd out until it's debugged and we can
merge -direct links with other running programs.

Fix MTU setting.
1998-04-23 03:23:03 +00:00
Poul-Henning Kamp 94a60328c1 Even with '-s', syslogd still creates an AF_INET socket, although
it is not bind(2)ed.

PR:		6366
Reviewed by:	phk
Submitted by:	Soren S. Jorvang <soren@dt.dk>
1998-04-22 06:28:18 +00:00
Brian Somers fdf6117177 o Remove some unused #includes.
o Make sure our ipcp throughput timer is stopped before being nuked
  with a memset.
o Don't initialise struct async & struct hdlc twice in modem_Create().
o Clarify some comments.
1998-04-21 01:02:32 +00:00
Robert Nordier be1f43797a Spelling/typo fix: (proccessed). 1998-04-20 20:57:16 +00:00
Robert Nordier cf2484d78c Spelling/typo fixes: (proccessed, og). 1998-04-20 20:55:43 +00:00
Nate Williams d0c0b545a7 - Argh, fix stupid logic error in the laststate/state fix previously. That's
what I get for trying to do too many things at once.
1998-04-20 16:24:03 +00:00
Bruce Evans 02bbe20fc1 Don't build files at install time (just to be consistent; the problem
is almost harmless here).

Submitted by:	Arne Henrik Juul <arnej@stud.math.ntnu.no>
PR:		6330
1998-04-20 15:28:02 +00:00
Nate Williams 2d4c8d9d6c - Don't try and keep track of the previous state, since the kernel may
change it w/out informing the program.  Instead, use the (now available)
  previous state returned by the kernel to make intelligent card
  removal/insertion decisions.
1998-04-20 15:24:28 +00:00
Dag-Erling Smørgrav 4970253b4f fd(4) referenced in HISTORY has nothing to do with floppy disks;
changed to fdc(4).
1998-04-20 11:34:47 +00:00
Jordan K. Hubbard 4f43ad3744 Note usage of Linux PLIP peer. 1998-04-20 06:18:36 +00:00
Nate Williams 8ff8eb13f7 MF22: Finish fixing 'looping' bug. 1998-04-20 05:42:26 +00:00
Brian Somers a7a615faaa Indent Auth name properly. 1998-04-20 00:21:24 +00:00
Brian Somers f45c790690 Do away with the static struct timeoutArg. Move the
struct pppTimer from struct link to struct physical
for doing carrier checking.
1998-04-20 00:20:41 +00:00
Brian Somers fe3125a0c3 o Use __attribute__ (#ifdef __GNUC__) to type-check
LogPrintf() and prompt_Printf(), and fix the bits
  identified as being wrong as a result.
1998-04-19 23:09:03 +00:00
Nate Williams c4bf475b75 - If we see a tuple we don't expect, don't spin forever. Withouth this fix,
I can't run pccardc dumpcis on my Wavelan card. :(

Obtained from:	PAO
1998-04-19 18:41:45 +00:00
Brian Somers e3c70ce931 Tidy up the use of struct pppTimer. 1998-04-19 15:24:50 +00:00
Brian Somers 1ad3093b3f Correct the args passed to `shell'. 1998-04-19 07:22:31 +00:00
Poul-Henning Kamp e6bb224e43 Allow specification of cache-size to pwd_mkdb
PR:		5193
Reviewed by:	phk
Submitted by:	Nick Hilliard <nick@foobar.org>
1998-04-19 07:15:34 +00:00
Brian Somers ba081e4360 o Allocate new CCP protocol options if they've been
enabled since we first REQ'd.
o Delete the allocated options when CCP is down (TLF).
o Clean the IPCP interface on the way down when we're
  *not* in auto mode (rather than when we are) - typo.
o Don't produce two similar IpcpLayerUp messages.
1998-04-19 03:41:01 +00:00
Brian Somers 8d9b9867cc Add the ``open'' command and expand ``close''. It's now
possible to ``close ccp'', change your compression algorithm,
then ``open ccp'' while the link is up without losing data.
1998-04-19 02:23:21 +00:00
Brian Somers 9dee069d8d Initialise our async escape map (oops, that hurt !). 1998-04-19 01:18:51 +00:00
Brian Somers 39d946522c Destroy struct chat when it's finished in struct datalink.
Initialise chat timers correctly as they're malloc()ed as
part of struct datalink, and initially contain garbage.
1998-04-18 23:17:26 +00:00
Brian Somers 635225ca84 Fix incorrect flag spec
PR:		6339 (part of)
Submitted by:	Chris Dillon <cdillon@wolves.k12.mo.us>
1998-04-18 10:05:38 +00:00
Brian Somers cdbbb6b571 Cosmetic: Clean up warnings. 1998-04-18 01:01:28 +00:00
Brian Somers 3edeb0c69e Support client side DNS server negotiation, disabled
and denied by default (POLA).

o Remove ``enable'' msext.  Now, doing a ``set nbns'' will
  automatically enable a NBNS ACK/NAK rather than a REJ.
o Add accept|disable|deny|enable dns.  If we ``accept'',
  we'll tell the peer what our nameservers are (if he asks).
  The values in resolv.conf can be overridden with the
  ``set dns'' command.  If we ``enable'', we'll REQ using
  our resolv.conf entries, and any NAKs are written back to
  resolv.conf.
o Remove ``show msext'' and show the relevent IP numbers in
  ``show ipcp''.
1998-04-17 22:05:37 +00:00
Brian Somers 030e4ebba8 o Remove bundle_LinkLost() and have the modem routines simply
call datalink_Down() where appropriate rather than
  modem_Hangup().
o Now, when something horrible happens (failed read/write, loss
  of carrier etc), we go offline and run any hangup scripts etc
  in a controlled manner - exactly the same as if someone says
  ``down'' at the prompt or sends us a HUP.
o -dedicated links that fail to make the modem raw close it,
  suffer the redial timeout then try to open it again.
o Add a ``carrier lost'' warning diagnostic.
1998-04-17 22:04:36 +00:00
David E. O'Brien 69d23ff062 Make ``-h'' follow the manpage, and suppress the burst page reguardless of
the number of ``-h'' given.
1998-04-17 17:25:49 +00:00
Brian Somers 50e5c17d3b Fix the worst sort of bug - a SEGV in a diagnostic !
Also, use sizeof sockaddr_in instead of 16 when writing
to the routing socket.
1998-04-16 23:06:53 +00:00
Brian Somers ee084ab956 Stop the idle timer if the timeout is disabled while
the timer is active.
1998-04-16 22:11:46 +00:00
Brian Somers 26afeaa28b o FsmDown() and FsmClose() any NCP that's still around before
going into phase DEAD when the last physical link disappears.
o Don't go to phase TERMINATE if we're already phase DEAD.
1998-04-16 21:19:05 +00:00
Brian Somers 63f98b41d4 o Understand ``syn'' and ``finrst'' in filter rules. This
is particularily useful when creating dial filters.
  Original work by: Junichi SATOH (junichi@astec.co.jp)
o Parse a filter IP of ``0.0.0.0'' as having a width of 0,
  not 32.
o Correct "set filter" usage message.
o Warn about bad filter names.
o Expand and correct a number of the man page sections.
1998-04-16 18:30:54 +00:00
Andrey A. Chernov 7220744319 Add ftp4.ru 1998-04-16 13:55:11 +00:00
Brian Somers 1342caed9c o Move the accept/deny/disable/enable globals either to the
bundle (non-negotiated vars) or to their respective IPCP,
  LCP or CCP.
o Enable rolling throughput statistics by default.
o Remove the `display' command.  These values now appear in
  `show bundle', `show ipcp', `show ccp' and `show lcp'.
o Initialise auth name & key at bundle create time (oops).
o Rename pppd-deflate (the id-24 hack) to deflate24.
o Don't send both a REJ and a NAK to an IPCP or LCP REQ.
  Favour the REJ (already done at the CCP level).
o Recurse in datalink_UpdateSet() when we change state, otherwise
  we end up setting no descriptors and getting jammed in the
  imminent select() instead of doing the dial/login/hangup.
o Display our CHAP encryption method despite being built with DES.
o Display VJ as not negotiated in ``show ipcp'' when necessary.
1998-04-16 00:26:21 +00:00
Poul-Henning Kamp 5a85f025f8 In light of the fact that several widespread sendmail alternatives exists
is reason enough to make the compilation & installation of sendmail an
make.conf option.  I know that you hate negative options Bruce.

PR:		6284
Reviewed by:	phk
Submitted by:	Adrian Colley <aecolley@world.std.com>
1998-04-15 16:37:42 +00:00
Brian Somers 250920922b Pass all command arguments around with struct cmdargs rather
than incrementing argv and decrementing argc.  Now individual
functions can determine their caller.  This also removes the
"prefix" hack in FindExec().
1998-04-14 23:17:24 +00:00
Brian Somers 7f717ec1b8 Use datalink_Down when LQR fails, not bundle_Close(). 1998-04-14 07:25:37 +00:00
Garrett Wollman 10ad031e1d Document the requirement for TCPMUX to also be enabled as an internal
service if any external TCPMUX servers are desired.

PR: 826
1998-04-13 15:05:14 +00:00
Doug Rabson 593f0dec5d Fixes for using amd with non-NFSv3 servers and for choosing the right address
for a multihomed server.

PR:		bin/6231, bin/4678
Submitted by:	Mika Nystrom <mika@cs.caltech.edu
1998-04-13 12:11:24 +00:00
Jordan K. Hubbard 90b14d4761 Fix dependent-package loading when pkg_adding with an FTP URL. I broke
this when I changed the playpen code to disallow recursion.  I know
this fixes a PR someplace but I can't seem to find it with the GNATs
search tool.
1998-04-12 16:01:10 +00:00
Brian Somers c08717df31 Remove ``show timeout'' and ``show auth'' and add ``show bundle''.
Mention ``show timer'' in the man page.
1998-04-11 21:50:47 +00:00
Brian Somers 99294c8bfa o Fix chats expect-send-expect - it shouldn't be
expect-send-send !
o Say `disabled' rather than 0s in `show timeout'.
o Set all arguments in ``set device'' rather than just
  the first (read: quotes aren't necessary).
o Set the device speed correctly (broken in last commit).
1998-04-10 23:51:33 +00:00
Brian Somers c8dc575810 Nuke the device name *after* unlocking it. 1998-04-10 14:55:11 +00:00
Brian Somers 73406cdfd5 Oops - fix alignment in `show modem'. 1998-04-10 13:22:38 +00:00
Brian Somers 565e35e50e o Remove the `mode' global - it's now per physical device.
o Shuffle things that live at the datalink level into
  ``show link'' rather than ``show modem''.
o Make both ``show'' commands prettier and more consistent,
  and display carrier status, link type and our name in
  ``show modem''.
o Show redial and reconnect information in ``show link''
  and remove ``show redial'' and ``show reconnect''.
o Down the correct link in bundle_LinkLost().
o Remove stale -direct and -background links at the end
  of our main loop, not when we know they're going.  This
  prevents unexpected pointer-invalidations...
o If we ``set server'' with the same values twice, notice
  and don't moan about failure.
o Record dial script despite our link mode.  The mode may
  be changed later (next mod) :-)  We never run scripts
  in -direct and -dedicated modes.
o Make ``set server none'' functional again.
o Correct datalink state array so that we don't report an
  ``unknown'' state.
o Pass struct ipcp to IpcpCleanInterface, not struct fsm.
o Create TUN_PREFIX define rather than hard-coding in main.c
o prompt_TtyInit now handles a NULL prompt for -direct mode
  rather than having to create one then destroy it uncleanly.
o Mention our mode in the "PPP Started" LogPHASE message.
o Bring all auto links up when we have something to send.
o Remove some redundant Physical_*() functions.
o Show which connection is running a command when logging
  commands.
o Initialise throughput uptime correctly.
1998-04-10 13:19:23 +00:00
Brian Somers c06d604b03 We don't require a newline before the prompt if we've done
a prompt_*Printf().
1998-04-08 18:27:29 +00:00
Brian Somers ce6694a567 Correct (yesterdays) broken -background flag. 1998-04-08 18:27:22 +00:00
Martin Cracauer d6b37778e9 (evil) hackers -> crackers 1998-04-08 12:00:48 +00:00
Brian Somers 85602e5267 Remove MODE_ALIAS and add AliasEnabled() macro.
Remove IsInteractive().
1998-04-07 23:46:09 +00:00
Brian Somers 4a632c808a Initialise bundle::idle::done when the timer's stopped. 1998-04-07 01:49:24 +00:00
Brian Somers 322cffa298 Print mbuf type names in `show mem'. 1998-04-07 01:29:44 +00:00