Commit Graph

4168 Commits

Author SHA1 Message Date
Joseph Koshy ec500c67a1 Document `-I' and `-R' options to `pkg_info'.
PR: 7155
1998-07-06 04:39:20 +00:00
Brian Somers 9dae3e8d4b Don't disable ^D in interactive mode.
Wished for by: pkh
1998-07-04 22:04:12 +00:00
Brian Somers 0dcb215a89 Don't require context when there's only one link
for ``open lcp''
1998-07-04 22:03:56 +00:00
Jordan K. Hubbard 3dc0dc887a MF22: check for null pointer. 1998-07-04 14:13:01 +00:00
Brian Somers 357f172839 Make things clearer.
Submitted (some time ago) by: Ted Mittelstaedt <tedm@portsoft.com>
1998-07-04 12:07:03 +00:00
Brian Somers 274211d743 Version 2.0-beta becomes 2.0 :-) 1998-07-04 10:24:49 +00:00
Brian Somers 622366b81d Suggest port 8668 rather than 6668 for natd.
6668 is IRC.
1998-07-04 01:53:54 +00:00
Brian Somers d4af231c81 Only start checking carrier when the datalink state machine
exceeds DATALINK_READY.  When we go back to READY or less
(eg. ``close lcp''), switch the carrier-checking-timer off again.

This fixes the callback example in ppp.conf.sample.
Noted as broken by: Damian Kuczynski <damian@best.pw.edu.pl>
1998-07-03 17:24:38 +00:00
Guido van Rooij 1af721d635 Fix off by 1 error. 1998-07-02 19:35:40 +00:00
Poul-Henning Kamp 1ce46cef12 /var/log/wtmp entries for ptys are treated differently in ac, since
they may not be logins.  The code for determining whether it is a pty
entry is broken.

PR:		7137
Reviewed by:	phk
Submitted by:	Tom Rush <tarush@mindspring.com>
1998-07-02 05:34:08 +00:00
Brian Somers 06337856e1 The CCP layer now behaves as follows:
o If we've denied and disabled all compression protocols, stay
  in ST_INITIAL and do an LCP protocol reject if we receive any
  CCP packets.
o If we've disabled all compression protocols, go to ST_STOPPED
  and wait for the other side to ask for something.
o If we've got anything enabled, start REQing as soon as the auth
  layer is up.
o If we're in multilink mode, than the link level CCP goes
  straight to ST_STOPPED irrespective of what's configured so that
  we never try to compress compressed stuff by default.
1998-06-30 23:04:17 +00:00
Bruce Evans 9064aa963a Don't assume that time_t is long. 1998-06-29 18:15:21 +00:00
Bruce Evans 8720f72c80 Don't assume that time_t is long. Fixed printf format errors. 1998-06-29 18:12:08 +00:00
Bruce Evans 418c2cdc85 Don't assume that time_t is long. 1998-06-29 18:09:59 +00:00
Bruce Evans c2deb6082e Don't assume that time_t is long. 1998-06-29 17:54:29 +00:00
Bruce Evans 7040dc3f37 Don't assume that time_t is long. Fixed printf format errors (don't
assume that ntohl() returns long).
1998-06-29 17:51:39 +00:00
Bruce Evans 890f10cd58 Don't assume that time_t is long. 1998-06-29 17:38:35 +00:00
Bruce Evans a8c09dabbd Don't assume that time_t is long. 1998-06-29 17:25:46 +00:00
Jordan K. Hubbard eeae79cc34 Crank the max possible disks/slices constants way down.
The probe for this sometimes makes IDE drives chatter their guts out
and takes an inordinately long time in such cases..
1998-06-29 09:28:01 +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
Steve Price 25d0f8a50c Note in log file if messages are being forwarded from a
remote machine.

PR:		7055
Submitted by:	Edwin Groothus <edwin@nwm.wan.philips.com>
1998-06-27 21:45:59 +00:00
Steve Price ccc3d3073b Typo.
PR:		7093
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-06-27 21:29:35 +00:00
Brian Somers 2d42ffabf1 More u_long -> u_int32_t 1998-06-27 16:24:52 +00:00
Brian Somers 6163841150 I find it *really* irritating that you can't ``cvs rm''
things without removing them first.
1998-06-27 15:33:17 +00:00
Brian Somers 10a9be1e88 Remove redundant includes 1998-06-27 14:18:15 +00:00
Brian Somers 615ad4f957 Don't dlopen()/dlsym() libalias, use it in the same way
as the rest of the world uses libraries.
1998-06-27 14:17:28 +00:00
Brian Somers 3f06c5995f Don't assume ``sizeof(u_long) == 4''
Submitted by: Theo
1998-06-27 12:03:50 +00:00
Brian Somers 7d81ddf5bd Cast void * to char * for log_Printf(). 1998-06-27 12:03:46 +00:00
Brian Somers 032d427689 ``struct tunnel_header'' -> u_int32_t in OpenBSD.
struct tunnel_header is going soon.

Suggested by: Theo
1998-06-27 12:03:43 +00:00
Brian Somers d9823e8a6d Don't depend on sizeof(u_long) == 4. 1998-06-26 19:02:40 +00:00
Brian Somers 3132bc1efe DISTRIBUTION=des 1998-06-26 18:50:29 +00:00
Joseph Koshy f618e998de Document environment variables used by pkg_{add,create,info}. These
include PKG_TMPDIR, TMPDIR, PKG_DBDIR.  Add a FILES section to these
manual pages.

PR: docs/7064
1998-06-26 07:15:38 +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
Bill Paul 021e3d59aa A long time ago I hacked mountd so that it would deal intelligently
with export lines where the same hostname was specified more than once
(this happens a lot with netgroups sometimes). Recently I discovered
that it needs to be hacked to deal with multiple instances of the
same IP address too.

I've been using this modification locally for several months with no
hassles.
1998-06-25 21:26:06 +00:00
Guido van Rooij 79962d3ede Implement new argument -l (OpenBSD has -a but we already use that).
This allows one to specify additional sockets in the unix domain
that syslogd listens to. Its primary use is to create log sockets in
chroot environments.
Obtained from:OpenBSD (with a bug fixed d
1998-06-25 19:39:19 +00:00
Julian Elischer e2c597dd6a Reviewed by: guido@mouse.gvr.org
Submitted by:	Archie@whistle.com
redo the last patch to allow differentiated kernel logging in
a much better way.
1998-06-24 23:50:20 +00:00
Brian Somers 141b3b7817 Oops - forgot these with the last commit. 1998-06-24 19:36:37 +00:00
Brian Somers 1af29a6e96 o If we come out of select() with only write descriptors that
end up writing zero bytes, sleep for 1/10 of a second so that
  we don't end up using up too much cpu.
  This should only ever happen on systems that wrongly report a
  descriptor as writable despite the tty buffer being full.
  Discussed with: Jeff Evarts

o Do an initial run-time check to see if select() alters the passed
  timeval.  This knowledge isn't yet used, but will be soon.
1998-06-24 19:33:36 +00:00
Jordan K. Hubbard c02085735c MF22: more explanatory message from config on version mismatch detection. 1998-06-24 06:16:32 +00:00
Peter Wemm 05f5bac14a Forgot to resync the RELNOTES to 2.3.5 1998-06-23 21:41:58 +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
Peter Wemm 0e40275a28 remove old hack that's no longer needed and now breaks the compile 1998-06-21 04:47:21 +00:00
Matthew Hunt 241a5629e6 Correct punctuation. 1998-06-21 04:33:36 +00:00
Peter Wemm f3af07bd28 Merge ppp 2.3.3 -> 2.3.5 changes onto mainline. 1998-06-20 18:02:16 +00:00
Brian Somers 74d14b4cc9 Do an InitRestartCounter when we get a TerminateReq
in Opened state.....  I have no idea why this never
caused problems in the past - maybe the restart
counter was bogusly initialised somewhere else :-/
1998-06-20 01:55:28 +00:00
Brian Somers d2a69fc3ba Re-initialise our timer service after fork()ing
to lose our terminal session.  Is this a bug in
setitimer() ? - it must be called again in the
child !
1998-06-20 01:36:38 +00:00
Brian Somers 09206a6f2a Create & use fsm2initial(), a function to bring a
state machine back to ST_INITIAL without going
through any unnecessary TLS/TLF pairs.
1998-06-20 00:19:42 +00:00
Brian Somers ad5b0e8be6 Make sure our recvmsg() is a SCM_RIGHTS message when
we receive a link from another ppp.
1998-06-18 23:38:04 +00:00
Brian Somers 1181eb8216 Don't assume that all ttys support carrier detect. If we're
passing our controlling terminal, always record our pid so
that the receiving ppp knows who to HUP.
1998-06-18 22:43:18 +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
Bruce Evans afafca8bcb Don't generate declarations for isa device structs in "ioconf.h".
Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.

Updated CONFIGVERS.  New configs are very incompatible with
previous versions.
1998-06-17 15:16:53 +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 a33b2ef772 Change some log levels. ALERTs are only logged when
something that can't happen happens or when everyone
needs to know.  ERRORs are only logged when something
unexpected happens.
1998-06-16 19:40:42 +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 9ef0938e40 Zero mbuf::pnext when Dequeue()ing. 1998-06-16 19:40:20 +00:00
Brian Somers 7729a18215 Only set the datalink::stayonline flag if we
close/down with CLOSE_LCP when our state is
DATALINK_READY or higher.
1998-06-16 07:15:16 +00:00
Brian Somers f7704be7d3 o Don't dump core with ~m in term mode.
o Always put a '\r' before a '\n' at the end of a line
  in prompt_vPrintf() in term mode, and make prompt_Printf()
  use prompt_vPrintf().
o Fix ~? message.
1998-06-16 07:15:11 +00:00
Brian Somers d93d3a9c32 o De-staticise things that don't need to be static.
o Bring the static ``ttystate'' into struct prompt so that
  the tilde context is per prompt and not global.
o Comment the remaining static variables so that it's
  clear why they're static.
o Add some XXX comments suggesting that our interface list
  and our hostname should be re-generated after a signal
  (say SIGUSR1) so that a machine with PCCARDs has a chance.
1998-06-15 19:06:58 +00:00
Brian Somers c9e11a112d Fix a rather nasty use of `static'. This caused a SEGV
when running ``link * load label'' as we ended up recursing
back into command_Interpret after nuking our command arg list.
1998-06-15 19:06:25 +00:00
Brian Somers 30291ffb15 Give ``load'' optional context. It's now possible to
``link 1,2,3 load label'' for people that want to set
up their links in a more mpd-like manner.
1998-06-15 19:05:51 +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
Joerg Wunsch 01d48801bc Oops, the previous commit missed one line of code. 1998-06-15 15:43:13 +00:00
Joerg Wunsch 9d70a1569c Watch out for null hostnames in netgroup entries, to avoid dumping core.
This happens if someone tries to export to a netgroup like:

mygroup		(,,mynisdomain)
1998-06-15 15:41:41 +00:00
Andrey A. Chernov 4cc28395cc Make it compatible with long usernames 1998-06-14 22:56:31 +00:00
Amancio Hasty 6797869271 Reviewed by: Amancio
Submitted by:	Randall Hopper <rhh@ct.picker.com>
    The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)

     The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.

For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
1998-06-14 20:05:27 +00:00
Brian Somers eee772ec70 Deal with PROTO_IGMP and PROTO_IPIP packets correctly.
Submitted by: Mark Tinguely <tinguely@plains.NoDak.edu>
  This change will allow a PPP host enabled with the "-alias" option to
  run mrouted. This does not intend to forward the IGMP nor tunneled packets
  to another host on the far side if the tun0 interface.
1998-06-14 01:21:24 +00:00
Brian Somers 42c57c8682 o Pass our negotiated number of VJ slots into
sl_uncompress_tcp() and drop packets with
  slot numbers that are out of range.
o Drop packets that want to use a slot that still
  has an IP header length of 0 (ie, the requested
  slot number is bogus again).

Without this code, if the other side mis-behaves (and
sends us garbage slot numbers), we happily ``adjust''
a memset(..., '\0', ...) TCP/IP header and promptly
cr*p all over the stack before returning.... quickly
followed by a SIGBUS.

Dodgy ISP used by, and help locating the problem from: jmz
Problem also seen by: Mourad de Riche <omnibus@image.dk>

There's still a link lockup after this happens, but my
bets are on the other side (who has already started sending
rubbish) being to blame.
1998-06-14 00:56:13 +00:00
Steve Price 8c0b8289ef Mention all the environment variables that can be used
to specify the device.

PR:		6927
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-06-13 19:28:51 +00:00
Steve Price 2dcf9f10d4 Minor tweaks in the AUTHORS section.
PR:		6921
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-13 18:55:55 +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 f56d7b337d Remove '\n' from `show throughput'. ctime() already does
a linefeed.
1998-06-12 17:45:41 +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 ff0f9439b4 o Maintain a link-type mask for open datalinks as well as
for all datalinks in a bundle.  Ppp now deals correctly
  with link types that are changed while open
o When changing the type of the last AUTO link, only clear
  the interface if we're not in PHASE_NETWORK.  This allows
  us to switch to -ddial mode while we have a connection
  without suddenly unexpectedly throttling ourselves by
  clearing the interface configuration.
  Problem area noted by: Aaron Jeremias Luz <aaron@csh.rit.edu>
1998-06-12 17:45:10 +00:00
Peter Wemm 7ec6ca7ce0 Always support an elf kernel when given one. 1998-06-12 16:25:18 +00:00
Peter Wemm ef1f75f486 #include <arpa/inet.h> 1998-06-12 16:24:13 +00:00
Peter Wemm e4da208bae Use the elf libalias name when compiled under elf. 1998-06-12 15:37:23 +00:00
Peter Wemm d1d9ad56a9 #include <arpa/inet.h> instead of rolling own prototype. 1998-06-12 14:58:03 +00:00
Peter Wemm ca979f0fa6 #include <arpa/inet.h> for inet_* definitions. 1998-06-12 14:39:00 +00:00
Peter Wemm 9945598607 bsd.dep.mk doesn't know about -idirafter, and doesn't parse -I the
same way that gcc does.
1998-06-11 10:42:58 +00:00
Peter Wemm d5431fa51e Activate libbind 1998-06-11 09:17:58 +00:00
Peter Wemm 3ae1582636 libbind.a and associated makefile goo is only used for named and named-xfer
now for the isc library.
1998-06-11 09:16:28 +00:00
John Birrell 0793ce314a Remove -Werror from CFLAGS on i386 because with -nostdinc gcc spits
warnings from unused static inline functions in headers if you happen
to set CFLAGS without -O.
1998-06-11 03:53:23 +00:00
Poul-Henning Kamp 1499abeef4 Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
Poul-Henning Kamp fe0c226de9 Spellint fixes.
PR:		6903 (not the contrib bits).
Reviewed by:	phk
Submitted by:	Josh Gillam <josh@quick.net>
1998-06-10 12:33:41 +00:00
Peter Wemm 573761ee0e There is no need to make nochange imply ignore as well.
Suggested by: bde
1998-06-10 06:45:08 +00:00
Julian Elischer d2b4b1fa20 Allow syslogd to separate out kernel log messages with a known
category.
e.g. separate out ipfw entries to a separate file.

Reviewed by:	(briefly) phk
Submitted by:	archie@whistle.com
Obtained from:	Whistle source tree
1998-06-10 04:34:56 +00:00
Jordan K. Hubbard 27d83e22de Stop including COMPAT_21 unconditionally for X now; that kludge hasn't
been necessary for awhile.
1998-06-10 01:15:46 +00:00
Brian Somers 5264ca0298 Fix a couple of warnings noted with -Wall on FreeBSD-2.1.5.
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:07 +00:00
Andrey A. Chernov 5c9f7df5dc Fix usage string 1998-06-09 20:19:59 +00:00
Brian Somers 255aa9e373 Show the time that we reached maximum throughput.
Submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca>
1998-06-09 18:49:10 +00:00
Andrey A. Chernov dc55fe4c05 Add optional config file field: signal number to send (defaulted to HUP)
F.e. apache restarts less agressively  on USR1 then on HUP
1998-06-09 18:24:04 +00:00
Doug Rabson 4d40ec2fb9 Add (mostly stub) alpha support. Incidentally, it doesn't build on stable
unless I manually construct y.tab.h.  Is this normal?
1998-06-09 14:02:08 +00:00
Warner Losh 42d494a30b $@ is deprecated, use longer forms of single char macros 1998-06-09 05:36:48 +00:00
Warner Losh e13ca89a55 $@ deprecated, use long form.
PR:	conf/3273
1998-06-09 05:14:43 +00:00
Warner Losh 67d3ec9a0f If we get back too much data to fit in result, return NULL. This avoids
a buffer overflow, but might negatively impact those hosts who have
enough aliases to fill MAXHOSTNAMELEN * 2 characters in them.

Good candidate for merging back into -stable.  Lightly tested by me, but
it came from OpenBSD a while ago.

Obtained from: OpenBSD
1998-06-09 05:06:27 +00:00
Warner Losh d944ccabfc Use correct size for readlink buffer. This is the size of the
buffer -1 since readlink adds its own NUL to the end.

Inspired by: Similar changes in OpenBSD
1998-06-09 05:02:29 +00:00
Warner Losh f520b5e894 use strncpy correctly
use strncat correctly
check buffer size in graph_name
Change paths from /tmp to /var/run for server sockets

This has been building in my tree for ages, but has remained lightly
tested.
Reviewed by:	jkh ages ago
1998-06-09 05:01:38 +00:00
Warner Losh fff3012516 o be careful about buffer overflows
o Use snprintf rather than sprintf

This is only lightly tested.
1998-06-09 04:58:36 +00:00
Brian Somers 645b7985ea Correct ``set server'' usage and add mention that ``set ns'' changed
in README.changes.
Suggested by: stuart henderson <stuart@internationalschool.co.uk>
1998-06-08 20:23:44 +00:00
Wolfram Schneider 5b496c24c1 Always ask for homedir.
PR: 6754
Submitted by: uhlar@netlab.sk
1998-06-07 18:38:32 +00:00
Brian Somers 37a8b7dcb8 Fix previous commit. bit 1 is the execute bit, not the read bit *blush*
ie, BINMODE=4551 -> BINMODE=4554
Pointed out by: Bruce Evans <bde@zeta.org.au>
1998-06-07 17:08:42 +00:00
Peter Hawkins ce4a641c8b PR: docs/3636
Submitted by:	Gary Palmer gpalmer@FreeBSD.ORG
Add mention of the 1024-character line length limit on the netgroup database.
1998-06-07 15:08:50 +00:00
Brian Somers c22130cd33 Use a relative libalias.so name (hardcoded at 2.5 - yeuch!). 1998-06-07 03:54:41 +00:00
Brian Somers a2b023b187 Make ppp world-readable so that root can get at it over
NFS when nobody isn't in group network :-)

Pointed out by: Bruce Evans <bde@zeta.org.au>
1998-06-07 00:16:57 +00:00
Brian Somers 7155510852 Update the write descriptor selection set for our data links
*after* shuffling fragments from the IP queue into the
individual link queues.

This fixes a latency problem pointed out by: Bruce Evans <bde@zeta.org.au>
1998-06-07 00:16:37 +00:00
Brian Somers 1c16aba2c7 Make ``set ? log'' more verbose.
Suggested by: Paul Dufresne <dufrp@oricom.ca>
1998-06-06 23:00:33 +00:00
Brian Somers da66dd135a Put the correct pid in /var/run/tunX.pid
Suggested by: many
1998-06-06 20:50:57 +00:00
Peter Hawkins 5051cf775a PR: docs/5986
Submitted by:	MITSUNAGA Noriaki mitchy@er.ams.eng.osaka-u.ac.jp
Replace use of obsolete .q groff macro with .Dq
1998-06-06 15:37:23 +00:00
Peter Wemm 7840cfdd8b Create a new flag, "nochange", which will specify that a directory is
to be created if it's missing, otherwise completely ignore it's modes and
owners.  Primary intended targets:  /usr/src and /usr/obj.

Adjust the 'not created: File exists' message to mention that it's a
directory that's the problem, otherwise it doesn't make sense.

I had created chown-style  -L and -P flag to control logical/physical mode
(ie: whether symlinks were followed), but the nochange flag is enough to
get the blasted thing out of my hair so I took them back out.
1998-06-05 14:43:42 +00:00
Steve Price 32c2131395 Fix a bunch of spelling errors.
PR:		6856
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
Bill Paul 02cd25bfe2 Darnit, that last commit was only supposed to change files in the
-current branch. I mistakenly checked out the 2.2.x rpc.ypxfrd into my
-current working directory. No harm done, but I got really confused
when I went to check out rpc.ypxfrd again and found the changes I
wanted to make were already there. (I'm going to fix the other 2.2.x
versions of the other programs in a minute.)

Anyway: protect errno in the signal handler, in the -current version
of rpc.ypxfrd this time.
1998-06-04 15:37:05 +00:00
Bill Paul 7d1c23760d Protect errno in signal handlers, like in portmap. 1998-06-04 15:11:32 +00:00
Bruce Evans 68a5c45fb2 Simplified using new yacc rules. This will fix bugs when we stop picking
up a possibly stale version of ns_parser.h from contrib/bind.
1998-06-04 07:25:52 +00:00
Peter Wemm f66ca81068 Remove bogus #defines and redefintions for KERNEL, mount, nfs_init, the
beastie builds just fine without them and gets less warnings.
1998-06-01 07:36:20 +00:00
Dag-Erling Smørgrav 8422d3119c Add a FILES section which references /etc/group
Suggested by:	Masafumi NAKANE <max@wide.ad.jp>
1998-05-31 17:24:25 +00:00
Bruce Evans 4e7f14b237 Inherit BINDIR, don't set it here. 1998-05-31 11:41:53 +00:00
Bruce Evans 67b780b03b Fixed double slashes in pathnames. 1998-05-31 11:32:38 +00:00
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
Brian Somers a36e970919 Add support for devices beginning with ``!'', where we execute
the given program, using stdin/stdout/stderr as our link
descriptor.
1998-05-13 19:06:27 +00:00
Poul-Henning Kamp 84717b42e8 .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
John Birrell ef1c4c53f4 The printf type checking in gcc wants %qd to be a long long, so add
a cast in case off_t is not a long long (as on alpha).
1998-05-13 06:52:08 +00:00
John Birrell 84cc0c31af Make -Werror i386 specific because -nostinc on alpha spits warnings
for unused static inline functions in header files.
1998-05-13 06:50:09 +00:00
Brian Somers 318fd42fb1 o Call unidentifyable devices "unknown" rather than "stdin".
o After descriptor transfer, strip _PATH_DEV from the full
  device name to get the base device - don't just get the base
  file name.
1998-05-12 17:34:29 +00:00
Brian Somers 66f634b6df o Do an mp_Down() when aborting ppp.
o Re-assign the link name when strdup()ing the datalink name.
o Add the link name to some more hdlc log messages.
1998-05-11 23:39:30 +00:00
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