Commit Graph

4231 Commits

Author SHA1 Message Date
pjd
c7115fd564 Connect ggatec(8), ggated(8) and ggatel(8) to the build. 2004-05-03 21:14:03 +00:00
pjd
7ba9850693 Don't repeat handshake.
This little thing can cause a deadlock, because taste mechanism start
to work after creation of ggate provider and I/O requests are sent from
other classes from the g_event thread, so number of pending events isn't 0.
Now ggatec(8) start second handshake and ggated(8) is trying to open
GEOM provider (for example md(4)) and it can't, because it hangs on
g_waitidle() in g_dev_open(). g_waitidle() cannot finish because
there is a pending read on event queue, and this read can't be
finished, because ggated(8) can't open target device.
GEOM Gate will recover from this deadlock, because requests will
timeout, but it of course isn't the best solution and I don't know
better one for now, so we should avoid opening GEOM providers while
there are pending requests in event queue.
2004-05-03 18:24:41 +00:00
andre
b3f3edbde9 Link state change notification of ethernet media to the routing socket.
o Print the link state for interface messages in monitor mode.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 16:30:32 +00:00
pjd
de8f91bb4c Paths correction.
Pointed out by:	ache, make buildworld
2004-05-03 07:21:59 +00:00
pjd
6420bffef3 We don't need this any more, while we have /usr/include/geom/concat/. 2004-05-03 07:20:27 +00:00
pjd
c9733d8224 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00
marcel
00c05d3c72 Build gpt(8) on all platforms, except sparc64. Currently gpt(8) is
not endian agnostic and thus will create big-endian GPTs on sparc64.
This we don't support. So, before gpt(8) can be used on a big-endian
machine, it has to deal with the endianness.
2004-05-01 18:17:23 +00:00
ambrisko
643bbdb471 For both ifconfig and route if we didn't get enough memory from the
prior sysctl due to the structure growing between calls try again.

Also try again for deleting routes if things fail.  We've seen
route -f fail this way which does not actually flush all routes.
This fixes it.  It will whine but it will do the work.

PR:		56732
Obtained from:	IronPort
2004-04-30 22:34:12 +00:00
pjd
8e31626f87 GEOM Gate network daemon. 2004-04-30 16:19:50 +00:00
pjd
2392eb11f4 GEOM Gate network client and control utility. 2004-04-30 16:18:01 +00:00
pjd
a025a63e5c GEOM Gate local control utility. 2004-04-30 16:15:13 +00:00
pjd
12626b15d0 Stuff shared between ggate utilities. 2004-04-30 16:13:45 +00:00
pjd
783ba5dc28 Makefile for building ggate utilities: ggatel(8), ggatec(8), ggated(8). 2004-04-30 16:12:20 +00:00
ghelmer
a4ef38e68a Invoke tzset(3) within the main loop to catch changes to /etc/localtime
when running as a daemon in the hope that it will fix situations
where the CMOS clock was apparently set using the stale TZ offset.
2004-04-27 14:43:03 +00:00
bmilekic
6bfb681d7d The previous change to mount(8) to report ufs or ufs2 used
libufs, which only works for Charlie root.

This change reverts the introduction of libufs and moves the
check into the kernel.  Since the f_fstypename is the same
for both ufs and ufs2, we check fs_magic for presence of
ufs2 and copy "ufs2" explicitly instead.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-26 15:13:46 +00:00
andre
ea029c59f3 Add the option versrcreach to verify that a valid route to the
source address of a packet exists in the routing table.  The
default route is ignored because it would match everything and
render the check pointless.

This option is very useful for routers with a complete view of
the Internet (BGP) in the routing table to reject packets with
spoofed or unrouteable source addresses.

Example:

 ipfw add 1000 deny ip from any to any not versrcreach

also known in Cisco-speak as:

  ip verify unicast source reachable-via any

Reviewed by:	luigi
2004-04-23 14:28:38 +00:00
tjr
d3a224c58c Only compare the interesting part of the bootblock with its backup.
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.

Obtained from:	NetBSD
2004-04-20 11:41:57 +00:00
rees
62541fe7ad use %zu instead of %zd
Requested by:	Bruce Evans
2004-04-15 16:12:12 +00:00
luigi
666306ed63 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
green
b7e7333659 Add -P arguments for dump(8) and restore(8) which allow the user to
use backup methods other than files and tapes.  The -P argument is
a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME
defined in the environment, respectively.

For example, I can back up my home to three DVD+R[W]s as so:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s2e  40028550 10093140 26733126    27%    /home
green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home
2004-04-13 02:58:06 +00:00
green
c3966d5f56 Improve the warnings for dump -L and do not bother doing the snapshot if
it is specified for read-only filesystems.

Submitted by:   Jason Young <jyoung8607@hotmail.com>
PR:     46672
2004-04-12 20:19:32 +00:00
ru
bc8dff6261 Document that -m also causes the capability list to be displayed. 2004-04-11 13:44:57 +00:00
ru
2051f8df7e Added the new interface capability option for drivers that implement
user-configurable polling(4) support.  Make ifconfig(8) aware of it.

Suggested by:	luigi
2004-04-11 13:36:52 +00:00
bde
8d66fc0bac Fixed unformatting of copyright clause 4 in previous commit. 2004-04-10 02:22:35 +00:00
markm
3382584a53 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
maxim
24a9959069 o Fix an incorrect parsing of 0.0.0.0/0 expression.
PR:		kern/64778
MFC after:	6 weeks
2004-04-09 17:26:01 +00:00
iedowse
f0c913fab2 Don't turn off the regular SIGINFO status information. The use of
the NOKERNINFO flag only marginally de-clutters the output and
has a number of unwanted side effects:
  o The kernel info might be what you want to see
  o ^T is left non-functional if ping is killed non-cleanly
  o "ping -q foo &" gets suspended on tty output

Encouraged by:	bde
2004-04-07 18:48:11 +00:00
pjd
1f432737c7 Add a workaround.
Now, if we have for example: ad0s1 ad0s1c ad2s1 ad2s1c and we will try
to do: gconcat label foo /dev/ad0s1 /dev/ad2s1 we'll get a panic:
panic: spoiled but dcr = 1
for inside of geom_slice class, backtrace shows:
g_access()
g_slice_access()
g_access()
g_concat_read_metadata()
We need to get a proper fix for this race before geom(8) will be committed.
2004-04-04 13:32:00 +00:00
phk
252490f02e Fix an off-by-one error in the function used to input the ascii/hex strings.
Be a little bit more helpful in error messages.
2004-04-04 07:28:58 +00:00
bde
86e35fbbb3 Include <time.h> instead of depending on namespace pollution in <sys/stat.h>
for the declaration of time().
2004-04-04 04:17:07 +00:00
mux
dc5a9ee4a5 It seems growfs(8) is now WARNS?=6 safe.
Tested on:	alpha, i386, ia64, sparc64
2004-04-03 23:56:24 +00:00
mux
1b636819c2 Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6.  I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.

The fs.h fix was suggested by:	marcel
Reviewed by:	md5(1)
2004-04-03 23:30:59 +00:00
mux
55e25cdbaa - Don't abuse caddr_t when what we really want is a void *.
- Use the %jd format and a cast to intmax_t to print an int64_t.
- The return type of getopt() is an int, not a char.

This fixes some warnings but there's still much more work to do here.
2004-04-03 22:56:54 +00:00
le
0d12428c67 Temporarily go back to WARNS=0 until I can figure out what's breaking
the {powerpc, sparc64, ia64} tinderboxes.

Sorry for the noise. :-(
2004-04-03 22:26:43 +00:00
le
a17f4f65f3 Make growfs WARNS=6 clean.
Approved by:	grog (mentor)
2004-04-03 17:40:19 +00:00
johan
e1ec892729 Remove these MAINTAINER lines since the maintainers has had their
commit bits retired for safe keeping.
2004-04-01 20:31:49 +00:00
bms
0f0c91f8a6 Fix regression in setkey whereby parser would fail to recognise tcp as
both a security protocol and an upper level protocol for encapsulation.

PR:		bin/63616
Submitted by:	ume@
2004-03-31 18:38:02 +00:00
luigi
584e80c409 Implement a '-f' flag to teach bsdlabel to work on files instead of
disk partitions.
2004-03-30 23:15:03 +00:00
sam
7252e651a9 add support for setting 802.11 rtsthreshold, transmit power,
and 11g protection mode

Reviewed by:	imp (just code)
2004-03-30 22:59:22 +00:00
dwmalone
2ecb18ec75 Remove a stray \n from a setproctitle.
Submitted by:	Niki Denev <nike_d@cytexbg.com>
2004-03-30 20:01:25 +00:00
ceri
2ace2c86ed Backout revision 1.140; it seems that the previous version is clear
enough.

Requested by:	ru
2004-03-27 14:13:53 +00:00
le
767e294bd4 Don't read an inode which isn't used to avoid problems on UFS2 where not
all inodes are initialized when running newfs.

Approved by:    grog (mentor)
2004-03-26 23:42:32 +00:00
rees
58cc599c03 fix for 64-bit arch:
use %zd to print size_t types and sizeof()

Approved by:	alfred
Tested on:	sparc64, amd64
2004-03-26 22:44:59 +00:00
maxim
49a980e89d o The lenght of the port list is limited to 30 entries in ipfw2 not to 15.
PR:		docs/64534
Submitted by:	Dmitry Cherkasov
MFC after:	1 week
2004-03-26 19:09:22 +00:00
bde
7202423b21 Fixed some style bugs in the residue of rev.1.14 (mainly initialization in
declarations, uncuddled elses and excessive braces).
2004-03-26 16:11:13 +00:00
ru
4d4cec31b2 Not too much point specifying -N but not specifying -M. 2004-03-26 09:24:45 +00:00
bde
c533a4c748 Fixed some style bugs in or related to rev.1.13 (mainly misindentation of
the getopt() case statement).
2004-03-26 08:39:36 +00:00
rwatson
2f8b52f624 Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system.  This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.
2004-03-26 03:26:15 +00:00
cperciva
ead757638d Final step of the sbin -> usr.sbin move: cvs rm src/sbin/nologin/*
I meant to do this a week ago, but I forgot.
2004-03-25 14:53:53 +00:00
ceri
c9aba4b63c Clarify the description of the "established" option.
PR:		docs/50391
Submitted by:	root@edcsm.jussieu.fr
MFC after:	1 week
2004-03-22 21:24:38 +00:00
obrien
27332d6545 Share the i386 boot manual page. 2004-03-22 00:52:27 +00:00
peter
579f0ac7f2 Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems.  Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.
2004-03-21 01:21:26 +00:00
ru
c0a913104f NULL -> 0. 2004-03-17 20:50:25 +00:00
scottl
71fc137f19 Remove the RAIDframe userland tool. 2004-03-16 12:28:40 +00:00
jhb
4ab24b5ada When installing boot blocks into an Alpha BSD label, setup the location,
length, and flags fields at the end of the SRM boot sector so that SRM can
find the bootstrap code.  This fixes bsdlabel -m alpha to generate bootable
disklabels.

Reviewed by:	phk
2004-03-15 23:10:34 +00:00
sos
03d0a2d088 Add printing of relevant SATA info where approbiate. 2004-03-15 13:21:41 +00:00
jmallett
ef79920dac Validate argument to -i. 2004-03-15 03:41:07 +00:00
cperciva
8756139f5d Don peril-sensitive glasses and throw the switch to move nologin(8) from
/sbin to /usr/sbin.  A symlink from /sbin/nologin -> /usr/sbin/nologin
is created for compatibility purposes.

This will probably not cause any problems, but anyone who is doing
anything particularly unusual with nologin(8) or shells in general might
be well advised to check that everything still works.

Bikesheds on:	cvs-all, current
2004-03-13 11:02:37 +00:00
cperciva
936a1cc4e0 Fix 10 year old size-of-bcopy bug.
PR:		bin/43930
Submitted by:	Alan Barrett
Approved by:	rwatson (mentor)
MFNetBSD:	revision 1.35
MFC after:	3 days
2004-03-13 00:11:05 +00:00
ru
3b823d2ef9 The print mask's first part is the base, not the total number of bit
identifiers.
2004-03-12 23:52:32 +00:00
ru
6f500f8ae2 Show the polling(4) flag on the interface. 2004-03-12 23:43:40 +00:00
bde
71f4d3aee0 Fixed mispellings of '\0' as NULL. 2004-03-11 11:41:54 +00:00
bde
b8f286ae63 Fixed misspellings of 0 as NULL. 2004-03-11 10:01:12 +00:00
phk
7a5cb964c5 Fix a long-standing deadlock issue with vnode backed md(4) devices:
On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.
2004-03-10 20:41:09 +00:00
bde
1206cae514 Fixed a misspelling of 0 as NULL. 2004-03-10 08:46:39 +00:00
jhb
6e4b5cc488 Make libgeom usable by C++ programs:
- Add DECL wrappers to libgeom.h.
- Rename structure members in libgeom.h to use a lg_ prefix for member
  names.  This is required because a few structures had members named
  'class' which made g++ very unhappy.
- Catch gstat(8) and gconcat(8) up to these API changes.

Reviewed by:	phk
2004-03-09 21:14:18 +00:00
mlaier
55ee1d7448 Link pf to the build and install:
This adds the former ports registered groups: proxy and authpf as well as
the proxy user. Make sure to run mergemaster -p in oder to complete make
installworld without errors.

This also provides the passive OS fingerprints from OpenBSD (pf.os) and an
example pf.conf.

For those who want to go without pf; it provides a NO_PF knob to make.conf.

__FreeBSD_version will be bumped soon to reflect this and to be able to
change ports accordingly.

Approved by:	bms(mentor)
2004-03-08 22:03:29 +00:00
markm
f1849df8d1 Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
brueffer
161e2878a2 s/considred/considered/ 2004-03-04 00:52:16 +00:00
johan
d3e8d40eb0 Make this WARNS=2 clean by:
- including <timeconv.h> to get _long_to_time prototype
	- removing an unused variable

Bump WARNS to it keep clean.

Approved by:	ume on ipfw@
2004-03-03 20:21:15 +00:00
ken
7387d6633f Fix a couple of camcontrol issues that popped up on sparc64:
- bzero the CCB header in getdevtree() and set the path properly, to
   avoid having random garbage in the CCB header.
 - if the lun isn't specified in a device specifier, it should default to
   0, not whatever random data happens to be in the lun variable.
 - move the prototype for getdevtree() out from under #ifndef MINIMALISTIC,
   since it is used in both cases.

Submitted by:	Marius Strobl <marius@alchemy.franken.de> (mostly)
MFC After:	2 weeks
2004-03-03 01:51:24 +00:00
dd
4928da6e94 Add CTLTYPE_QUAD to the list of types for which we don't want an empty
value.  All the other numeric types are doing it . . .
2004-03-02 05:42:52 +00:00
mlaier
9c3431aab1 Add skeleton build dirs for pf userland:
libexec/ftp-proxy	- ftp proxy for pf
 sbin/pfctl		- equivalent to sbin/ipf
 sbin/pflogd		- deamon logging packets via if_pflog in pcap format
 usr.sbin/authpf	- authentification shell to modify pf rulesets

Bring along some altq headers used to satisfy pfctl/authpf compile. This
helps to keep the diff down and will make it easy to have a altq-patchset
use the full powers of pf.

Also make sure that the pf headers are installed.

This does not link anything to the build. There will be a NO_PF switch for
make.conf once pf userland is linked.

Approved by:	bms(mentor)
2004-02-28 21:50:50 +00:00
maxim
5c5a9e1cd3 o Remove obsoleted '-N' and '-d' flags. 2004-02-28 10:42:27 +00:00
maxim
6ee7ae55ca o Sync usage() with reality: add 'z' flag.
MFC after:	1 week
2004-02-28 10:22:17 +00:00
scottl
7879b803f5 In the case of a background fsck, periodically update the process title
with a progress update.
2004-02-28 07:50:42 +00:00
kan
e505a6045d Look for both name and if_<name> strings in module metadata. Pseudo-devices
like tun are naming their modules using the 'if_; prefix and previous version of
the code failed to detect their presence in the kernel, resulting in the same
module being loaded twice.
2004-02-27 06:43:14 +00:00
rwatson
310ae11269 Add a "-l" parameter to mdmfs so that memory file systems can be
created with the multilabel flag from inception.  This simply
passes the "-l" flag on to newfs(8).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:15:47 +00:00
rwatson
e22eba067b Add a "-l" flag to newfs, which sets the FS_MULTILABEL flag. This
permits users of newfs to set the multilabel flag on UFS1 and UFS2
file systems from inception without using tunefs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:14:27 +00:00
bms
38e644abc2 Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com.
Update <protocols/routed.h> for the MD5 changes requested in bin/35843.
Preserve local changes.

Education by:	obrien, markm, pointy-stick
PR:		bin/35843 (and doubtless others)
2004-02-25 23:45:57 +00:00
bde
ee0d79b2b5 Fixed missing libraries. This unbreaks the -DNO_DYNAMIC_ROOT and
-DNOSHARED=yes cases.
2004-02-24 03:46:12 +00:00
johan
1a1602ce7d style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
pjd
39c3663b24 Connect gconcat(8) to the build.
Approved by:	scottl (mentor)
2004-02-23 20:06:56 +00:00
pjd
461b945b3b - Connect manual page for gconcat utility to the build.
- Fix usage.

Approved by:	scottl (mentor) (implicity)
2004-02-23 20:06:21 +00:00
pjd
ea6971021c Added manual page for gconcat utility.
Approved by:	scottl (mentor) (implicity)
Reviewed by:	simon
2004-02-23 12:44:08 +00:00
cperciva
b7bd706374 Report login attempts to syslog. Due to the statically-linked nature of
nologin(8), this causes a considerable (100K) increase in the binary size,
so I've added a NO_LOGIN_LOG option which disables this.

While I'm here, s/sizeof(MESSAGE)/sizeof(MESSAGE) - 1/, in order to
avoid writing the string-terminating zero byte.

No complaints from: -current
Approved by:	rwatson (mentor)
2004-02-22 10:03:24 +00:00
rees
071d1fc4dc change baduser and badgroup from -2 to 65534, 65533
these should probably be looked up instead, but this is better than before
also minor format changes for style(9)
2004-02-21 21:02:59 +00:00
yar
425d619446 We can cross-reference to vlan(4) as long as
the corresponding manpage has been committed.
The rest of "vlan" words, which are refering
to the technology itself, should be capitalized.

MFC after:	1 week
2004-02-21 14:21:18 +00:00
yar
0024f96ca5 The hardware tagging capability is set on the physical
interface that is parent to a vlan(4) interface,
not on the vlan(4) interface itself.
2004-02-21 14:11:57 +00:00
mux
e6709df8ed Mention that securelevel 1 also blocks access to /dev/io if it
exists (not all platforms have it).
2004-02-20 21:38:23 +00:00
tjr
7c8e81b2ee Merge from RELENG_4 1.28.2.13: Fix saving system crash dumps larger than
2 GB by using fseeko() instead of fseek().
2004-02-20 12:22:52 +00:00
phk
3eb009d511 s/bytes/byte/ 2004-02-19 19:53:07 +00:00
pjd
41d581dde7 Add control utility for disk concatenation (GEOM_CONCAT class).
Reviewed by:	phk, scottl
Approved by:	scottl (mentor)
2004-02-19 16:02:08 +00:00
dwmalone
75d682a700 Add a -n option that stops ip6fw making any changes to the rules
in the kernel.

Submitted by:	Orla McGann <orly@redbrick.dcu.ie>
MFC after:	3 weeks
2004-02-18 15:56:53 +00:00
rees
0ebb559c06 remove dead code
Approved by:	alfred
2004-02-17 22:28:26 +00:00
grog
6edba3d57b Report the difference between ufs and ufs2.
Submitted by:	"Christian S.J. Peron" <maneo@bsdpro.com>
2004-02-17 08:43:05 +00:00
grog
d5be609192 Explain what console names are valid. 2004-02-17 04:53:47 +00:00
grog
b2cef6170a Recognize if the user supplies the full pathname to /dev/console and friends,
and DTRT.

Explain if he supplies a pathname that is not in /dev.
2004-02-17 04:51:06 +00:00
tjr
7c98ad2f78 Remove unnecessary newlines from errx() arguments. 2004-02-17 02:02:18 +00:00
le
752577e98c Also remove "makedev" from the online help. 2004-02-16 23:04:52 +00:00