Commit Graph

5680 Commits

Author SHA1 Message Date
Sam Leffler
fdef6acc3d updates for 802.11-related parameters
Reviewed by:	thompsa
Approved by:	re (hrs)
2007-07-09 15:39:58 +00:00
Andrew Thompson
b3d37ca5f8 Allow the LACP state to be queried from userland which at the moment is the
actor and partner peer info. Print out the active aggregator and per port data
in verbose mode from ifconfig.

Approved by:	re (mux)
2007-07-05 09:18:57 +00:00
Bjoern A. Zeeb
53bf725ae1 Remove the -DFAST_IPSEC from Makefiles again.
This was needed during the IPSEC->FAST_IPSEC->IPSEC transition
period to not break the build after picking up netipsec header
files. Now that the FAST_IPSEC kernel option is gone and the
default is IPSEC again those defines are superfluous.

Approved by:	re (rwatson)
2007-07-05 08:56:46 +00:00
Andrew Thompson
60932bc9ae Use the -n flag on ifconfig so that dhclient does not cause the kernel module
to be reloaded when the interface is torn down.

Reviewed by:	brooks
Approved by:	re (kensmith)
2007-07-03 17:49:32 +00:00
Max Laier
60ee384760 Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
 - add tftp-proxy
 - new altq mtag link

Approved by:	re (kensmith)
2007-07-03 12:46:08 +00:00
George V. Neville-Neil
8409aedfa6 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re
2007-07-01 12:08:08 +00:00
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Maxim Konovalov
d069a5d478 o Make ipfw set more robust -- now it is possible:
- to show a specific set: ipfw set 3 show
    - to delete rules from the set: ipfw set 9 delete 100 200 300
    - to flush the set: ipfw set 4 flush
    - to reset rules counters in the set: ipfw set 1 zero

PR:		kern/113388
Submitted by:	Andrey V. Elsukov
Approved by:	re (kensmith)
MFC after:	6 weeks
2007-06-18 17:52:37 +00:00
Xin LI
98397198e7 In the previous changeset a cast of myminor to u_int were
removed, which will cause problems on architectures where
longs are longer than ints, for instance,
	"mknod foo c 0 0xffff00ff"
would fail in such cases.

Use a proper cast instead.

Prompted by:	bde
2007-06-14 03:16:16 +00:00
Andrew Thompson
22dcc3c17b Add the vlan tag to the bridge route table. This allows a vlan trunk to be
bridged, previously legitimate traffic was not passed as the bridge could not
tell that it was on a different Ethernet segment.

All non-tagged traffic is treated as vlan1 as per IEEE 802.1Q-2003
2007-06-13 18:58:04 +00:00
Robert Watson
0cae11b9cc Remove IPX over IP tunneling pieces from ifconfig(8), omitted portion of
previous commit:

  Remove IPX over IP tunneling support, which allows IPX routing over IP
  tunnels, and was not MPSAFE.  The code can be easily restored in the
  event that someone with an IPX over IP tunnel configuration can work
  with me to test patches.

  This removes one of five remaining consumers of NET_NEEDS_GIANT.

  Approved by:    re (kensmith)

Spotted by:	Artem Naluzhny <tutat nhamon dot com dot ua>
2007-06-13 18:07:59 +00:00
Xin LI
5224d0a1d6 WARNS=6 2007-06-13 05:30:07 +00:00
Poul-Henning Kamp
adf28c3c9b Add recoverdisk to the base system, it is far too useful to live
in obscurity over in src/tools.

(Repocopied)
2007-06-12 21:31:39 +00:00
Andrew Thompson
6b3375abfa Catch up with variable name changes in struct lagg_protos. 2007-06-12 10:07:57 +00:00
Andrew Thompson
927a1b4120 Reset the pointer to the ioctl buffer after it gets changed. 2007-06-12 00:52:40 +00:00
Andre Oppermann
a6575bfc2d Add reporting and toggling of TCP LRO (large receive offload) support to
ifconfig(8).
2007-06-11 20:15:20 +00:00
Olivier Houchard
083524da25 Exclude inet_addr.c from the build.
It only provides inet_aton(), which is already provided by the libc. This
causes multiple symbol definitions when linking statically.

Reviewed by:    darrenr
2007-06-11 19:38:38 +00:00
Bruce Evans
6b6b665bfd When we return from a "show" function without printing anything except
a warning, return 1 instead of 0 to indicate that we didn't print
anything, so that top-level callers don't print a spurious newline.
This is mainly to fix output formatting when stderr is redirected.  It
also helps in some cases when stderr is interleaved with stdout,
depending on the details of the interleaving (this program has the
usual null explicit support for syncing stderr with stdout).

Return 1 instead of -1 after printing the "malloc failed" warning, since
the return value is boolean.
2007-06-11 13:02:15 +00:00
Sam Leffler
8f3591a5bb Update for revised 802.11 support:
o revised channel handling support; ifconfig now queries the kernel to
  find the list of available channels and handles channel promotion;
  channel attributes can be specified as part of the channel; e.g. 36:a
  for channel 36 in 11a (as opposed to turbo A or HT A)
o use channel list to map between freq and IEEE channel #; this eliminates
  all knowledge of how the mapping is done and fixes handling of cases
  where channels overlap in the IEEE channel # space but are distinct in
  the frequency+attributes space (e.g. PSB)
o add new knobs: bgscan, ff (Atheors fast frames), dturbo (Atheros
  Dynamic Turbo mode), bgscanidle, bgscanintvl, scanvalid, roam:rssi11a,
  roam:rssi11b, roam:rssi11g, roam:rate11a, roam:rate11b, roam:rate11g
  (roaming parameters), burst, doth (forthcoming 11h support)
o print contents of WME, ATH, WPA, RSN, information elements with -v option
o print signal strength in dBm
o print noise floor in dBm
o add list txpow to print tx power caps/channel
o change default channel display in status to be more informative
2007-06-11 03:56:33 +00:00
David Malone
e37d2b3001 Some improvements to the int-type printing code based on suggestions by bde. 2007-06-10 20:11:52 +00:00
David Malone
fd8c668afc Fix a number of WARNS, including printf, constness and unsigned comparison
warnings.
2007-06-10 19:32:20 +00:00
David Malone
21e1f59618 Some style improvements suggested by bde, including removing an
unused include, adding parens for return and sizeof and renaming,
adding some missing whitespace and sorting some variables.
2007-06-10 19:13:40 +00:00
David Malone
41e419cb61 Use common code for printing ints and longs by coppying the sysctl
value into a variable of the right type and then printing it via
an intmax_t. This makes avoids some duplication and makes it easy
to add a new integer format Q for printing things of type CTLTYPE_QUAD.
2007-06-04 18:02:23 +00:00
Darren Reed
d7eeb25225 Merge IPFilter 4.1.23 back to HEAD
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13
2007-06-04 02:54:36 +00:00
Remko Lodder
fcd7ed0e3a I understood the MLINK part incorrectly, it should be the other way around
also remove the init mlink to securelevel.

Discussed with and sharing pointyhat with:	brueffer
2007-06-01 21:48:07 +00:00
Tom Rhodes
93c26a8293 The newfs_msdos utility does not store the boot signature in the
correct place on large sector disks.  The boot signature should be at
offset 0x1fe in the BPB; newfs_msdos currently stores it 2 bytes from
the end of the sector.

Taken from:	NetBSD
2007-05-31 20:06:46 +00:00
Kevin Lo
76f23bd523 Check fdopen return value.
Reviewed by: phk
2007-05-28 09:48:25 +00:00
Ruslan Ermilov
0a21e430f3 Fix the online usage for the "dump" command. 2007-05-24 09:21:20 +00:00
Andrew Thompson
a389ab003f Add the -n flag for disabling automatic module loading, this will be used by
rc.d to stop it reloading the network module on unload.
2007-05-22 17:41:09 +00:00
Olivier Houchard
e81f504954 Force the alignment of the chars arrays, as they are casted later to
structs.
gcc 4.2 doesn't do it by default, and that results in unaligned access on
arm.
2007-05-21 14:38:45 +00:00
Giorgos Keramidas
5810c7ef77 Add an example which shows how mdconfig(8) can be used
to mount an ISO 9660 CD image file.

PR:		112691
Submitted by:	Warren Block, wblock at wonkity.com
MFC after:	3 days
2007-05-18 13:57:17 +00:00
Marcel Moolenaar
cf805fab87 Fix the construction of the gctl_req that got broken by my
previous commit and that introduced optional parameters.
Existing classes (like geli(8)) use empty strings by default
and expect the parameter to be passed to the kernel as such.
Also, the default value of a string argument can be NULL.
Fix both cases by making the optional parameter conditional
upon gc_argname being set and making sure to test for NULL
before dereferencing the pointer.

Reported by: brueffer@
2007-05-17 15:34:51 +00:00
Marcel Moolenaar
18e10ae841 Bump G_LIB_VERSION to reflect the ABI change.
Pointed out by: pjd@
2007-05-16 23:32:40 +00:00
Marcel Moolenaar
3cf55d3ab9 Add gpart(8).
In order to support gpart(8), geom(8) needs to support a named
argument. Also, optional string parameters are a requirement.
Both have been added to the infrastructure. The former required
all existing classes to be adjusted.
2007-05-15 20:25:18 +00:00
Remko Lodder
c918e9f747 -n is used by newfs to tell "do not generate a .snap directory" instead of
specifying rotational-positions, reflect that in the command arguments.

PR:		bin/110178
Submitted by:	Alex Kozlov <spam at rm-rf dot kiev dot ua>
Approved by:	imp (mentor)
2007-05-14 19:23:13 +00:00
Pav Lucistnik
a8dec2ad79 Replace incomprehensive description of -m by much clearer text from OpenBSD,
with the exception of one word.

PR:		docs/112465
Submitted by:	naddy
Obtained from:	OpenBSD
MFC after:	1 week
2007-05-12 22:35:22 +00:00
Yoshihiro Takahashi
a1d83124ce Another merging from sbin/fdisk/fdisk.8.
PR:		109929
Submitted by:	Alex Kozlov
2007-05-10 12:33:00 +00:00
George V. Neville-Neil
559d3390d0 Integrate the Camellia Block Cipher. For more information see RFC 4132
and its bibliography.

Submitted by:   Tomoyuki Okazaki <okazaki at kick dot gr dot jp>
MFC after:      1 month
2007-05-09 19:37:02 +00:00
Maxim Konovalov
bd1d3456dc o Teach get_mac_addr_mask() to not silently accept incorrect MAC
addresses.
o Swap a couple of magic 6s by ETHER_ADDR_LEN.

PR:		bin/80913
Submitted by:	Andrey V. Elsukov
MFC after:	1 month
2007-05-09 18:31:49 +00:00
Yoshihiro Takahashi
a39259958d Reduce diffs against fdisk/fdisk.8. 2007-05-09 11:46:31 +00:00
Yoshihiro Takahashi
997ede1de7 - A partition number is allowed to 1-8.
- Remove non-exist -b flag.
- Add reference to boot98cfg and newfs.
- s/disklabel/bsdlabel/
2007-05-09 11:38:58 +00:00
Andre Oppermann
5b93d33118 Add Apple HFS+ (0xAF) MBR partition type identificator.
Submitted by:	rpaulo (SoC2007 student)
2007-05-06 18:48:30 +00:00
Pawel Jakub Dawidek
18eb427c60 Correct some typos. 2007-05-06 14:54:41 +00:00
Pawel Jakub Dawidek
e15b9720f1 Fix mdoc warnings. 2007-05-06 00:31:38 +00:00
Bjoern A. Zeeb
7a92401aea Add support for filtering on Routing Header Type 0 and
Mobile IPv6 Routing Header Type 2 in addition to filter
on the non-differentiated presence of any Routing Header.

MFC after:	3 weeks
2007-05-04 11:15:41 +00:00
Pawel Jakub Dawidek
e6d0ea1022 Do some cleanups (like freeing memory and closing file descriptors) before
leaving the functions.
2007-05-01 23:33:12 +00:00
Maxim Konovalov
7914c60f5a o Add -p flag: print a slice table in fdisk configuration file format.
Now it is possible to do something like fdisk -p ad0 | fdisk -f - ad1.

PR:		bin/110182
Submitted by:	Jukka A. Ukkonen
MFC after:	1 month
2007-04-30 18:29:36 +00:00
Maxim Konovalov
5b41efdd54 o Make ipfw(8) show rules with mac/mac-type options correctly.
Before:

$ ipfw -n add 100 count icmp from any to any mac-type 0x01
00100 count icmp 0x0001
$ ipfw -n add 100 count icmp from any to any mac any any
00100 count icmp MAC any any any

After:

$ ipfw -n add 100 count icmp from any to any mac-type 0x01
00100 count icmp from any to any mac-type 0x0001
$ ipfw -n add 100 count icmp from any to any mac any any
00100 count icmp from any to any MAC any any

PR:		bin/112244
Submitted by:	Andrey V. Elsukov
MFC after:	1 month
2007-04-30 17:39:30 +00:00
Yaroslav Tykhiy
3cb8dc7cd5 Fix a typo: argv -> argvp
Rationale:
We are interested in the current (last) element of the argv array
there, not in its first element.  The if construct is there because
we want to avoid adding empty (zero-length) arguments to argv, so
we just don't advance argvp if the current argument is empty, and
it gets overwritten at the next iteration.  Note that strsep(3)
doesn't treat consecutive delim characters as a single separator,
it returns empty fields between such characters, and it's up to the
caller to handle them this or that way.

Also add a comment that the argv array ends up null-terminated in
any case (it's due to the design of the for loop) as an answer to
a possible question why the whole argv isn't zero-filled.

Submitted by:	yongari
Tested by:	yongari
MFC after:	3 days
2007-04-30 13:21:43 +00:00
Poul-Henning Kamp
601c3cc018 Improve reporting in recoverdisk a good deal.
Submitted by:	Ulrich Spoerlein <uspoerlein@gmail.com>
PR:	111630
2007-04-23 12:17:27 +00:00
Warner Losh
95f75d437b Because there are so many more partitions on pc98 than on wintel (16
vs 4), supress all unused partition output unless -v is specified.
This makes operating on a 'typical' disk with one partition less
painful.  The 30 lines needed for the empty partitions no longer
scroll the useful information off the screen.  When the user requests
a specific partition, the unused information is not suppressed.

Also add the partition name to the -s output.

Initialize the partition name to 'FreeBSD' when -I is specified.
2007-04-21 22:47:35 +00:00
Mike Makonnen
ad092d18d7 Correct two issues in ping6:
1. The static buffer that ping6(8) uses to hold the control data
   it gets from recvmsg(2) is too small in some cases.
2. When it prints the extra header information it doesn't do
   any checking to make sure the data it's printing is within
   the bounds of the supplied buffer.

Fix this by:
o Increasing the buffer to hold extra headers to 10240 bytes (the minimum
  according to RFC3542 sec. 20.1) and allocate it dynamically.
o In verbose mode, specify a warning if any control data from recvmsg(2)
  was truncated because the buffer was too small.
o When printing the extra headers make sure not to overrun the buffer
  boundaries.

Reviewed By: mlaier
PR: kern/99425
MFC After: 1 month
2007-04-19 15:41:00 +00:00
Maxim Konovalov
1d9f903ae8 o Add missed w/space in the error message.
Spotted by:	Ivan Voras
MFC after:	1 week
2007-04-17 16:36:24 +00:00
Andrew Thompson
18242d3b09 Rename the trunk(4) driver to lagg(4) as it is too similar to vlan trunking.
The name trunk is misused as the networking term trunk means carrying multiple
VLANs over a single connection. The IEEE standard for link aggregation (802.3
section 3) does not talk about 'trunk' at all while it is used throughout IEEE
802.1Q in describing vlans.

The lagg(4) driver provides link aggregation, failover and fault tolerance.

Discussed on:	current@
2007-04-17 00:35:11 +00:00
Maxim Konovalov
fd31a32a65 o IFNAMSIZ includes a terminating null byte.
Submitted by:	rdivacky
MFC after:	1 week
2007-04-14 16:09:23 +00:00
Poul-Henning Kamp
306d73d61e Align -p output in TAB built columns suitable for /etc/fstab. 2007-04-13 21:30:47 +00:00
Ed Maste
9f0d81ba56 The minimum size of an RFC3442 destination descriptor is five bytes, so
correct test to -ge 5.  Without this change an RFC3442 encoded default
route would be ignored.

Reported by:	Cedric Jonas <cedric at decemplex dot net>
2007-04-13 15:07:10 +00:00
Andrew Thompson
68bca8a5e3 Bump document date for new trunk commands. 2007-04-10 03:35:42 +00:00
Andrew Thompson
7b62d98bf8 Hook trunk(4) up to the build. 2007-04-10 00:35:31 +00:00
Andrew Thompson
b47888ceba Add the trunk(4) driver for providing link aggregation, failover and fault
tolerance.  This driver allows aggregation of multiple network interfaces as
one virtual interface using a number of different protocols/algorithms.

failover    - Sends traffic through the secondary port if the master becomes
              inactive.
fec         - Supports Cisco Fast EtherChannel.
lacp        - Supports the IEEE 802.3ad Link Aggregation Control Protocol
              (LACP) and the Marker Protocol.
loadbalance - Static loadbalancing using an outgoing hash.
roundrobin  - Distributes outgoing traffic using a round-robin scheduler
              through all active ports.

This code was obtained from OpenBSD and this also includes 802.3ad LACP support
from agr(4) in NetBSD.
2007-04-10 00:27:25 +00:00
Pawel Jakub Dawidek
2663c8855e Implement a work-around for poor ggate write performance. 2007-04-06 11:19:48 +00:00
Pawel Jakub Dawidek
04fa63f05e Remove temporary files when there are no longer needed. 2007-04-06 11:16:11 +00:00
Thomas Quinot
993425ee98 (bread): For a read that is contained entirely within a block, never copy
out more than size bytes to the caller's buffer.

PR:		bin/111191
Reviewed by:	pb
MFC after:	1 week
2007-04-05 20:31:23 +00:00
Pawel Jakub Dawidek
89f75c2a04 - Protect against specifing journal less than 100MB and against journal
which size is not multiple of sector size.

  Reported by:	Eric Anderson <anderson@centtech.com>

- Improve wording in error message. I'm sorry, I don't remember who
  submitted this one.
2007-04-03 15:29:16 +00:00
Sam Leffler
3b4f84880e don't display ssid cloaking status as "ssid HIDE", use the cmd line
parameter like everything else

MFC after:	2 weeks
2007-03-30 18:14:04 +00:00
Andrew Thompson
99469fe270 Correct the name of the 'proto' command.
MFC after:	3 days
2007-03-29 21:30:26 +00:00
Yaroslav Tykhiy
f013cfc544 Back out rev. 1.129 because it breaks the practice of auto-loading
hardware drivers.  Unlike pseudo-device drivers, which just attach
to the cloning framework and wait for "ifconfig create", h/w drivers
create interfaces for installed cards as soon as loaded.  The issue
of devd(8) involuntarily reloading modules should be dealt with in a
different way.
2007-03-24 20:26:54 +00:00
Pawel Jakub Dawidek
5d47cd0f1a Exit status should be 1 on error.
PR:		bin/110705
Reported by:	Tom Judge
MFC after:	2 weeks
2007-03-23 21:05:36 +00:00
Yaroslav Tykhiy
a40fb996ae Attempt to load the kernel module only if we are going to create a
new interface.  In other cases loading the module is unwanted and
can lead to ill side effects.  One such effect found is as follows:
"kldunload if_foo" tells the module to kill all its interfaces,
which results in messages sent to devd; the module unloads.  Then
devd starts processing the messages, which ends up in a etc script
running ifconfig fooX, which reloads the module.
2007-03-12 13:08:56 +00:00
Sam Leffler
7c25c5c447 point-to-point address should come from ifa_dstaddr 2007-03-09 23:28:40 +00:00
Yaroslav Tykhiy
9a7d93d6a7 Don't leave a NULL value in mdsuffix when a particular md
unit w/o suffix is specified.  It had better be an empty
string as it will be passed to a printf-like function that
builds the command line to run.

PR:		kern/109863
MFC after:	1 week
2007-03-07 07:45:38 +00:00
Kirk McKusick
a9093e846d Move macros describing extended attributes in UFS from
<sys/extattr.h> to <ufs/ufs/extattr.h>. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until <sys/extattr.h>
and <ufs/ufs/extattr.h> have been updated.

Suggested by:	Robert Watson
2007-03-06 08:13:21 +00:00
Thomas Quinot
3bbd554a99 Add "fg" option as antonym to "bg"; add "hard" option as antonym to "soft".
This is for better compatibility with other environments (Linux, Solaris,
HP-UX, AIX and Tru64 support these options).

PR:		bin/109924
MFC after:	1 week
2007-03-05 14:47:54 +00:00
Pawel Jakub Dawidek
97a669a3b2 Warn when user use sectorsize bigger than the page size, which will lead
to problems when the geli device is used with file system or as a swap.

Hopefully will prevent problems like kern/98742 in the future.

MFC after:	1 week
2007-03-05 12:41:44 +00:00
Pawel Jakub Dawidek
5b110804b1 Fix incorrect comment. Geli will protect against data modification, of
course! It won't protect against reply attacks - try harder to explain
them correctly.

MFC after:	1 week
2007-03-05 12:39:49 +00:00
Pawel Jakub Dawidek
b8f6a34f3e Document -J in usage.
Submitted by:	Eric Anderson <anderson@freebsd.org>
2007-03-02 20:07:59 +00:00
Sam Leffler
e5f015499d o consistently check strlcpy result
o warn when we skip an interface because it's name is too long
2007-02-27 17:11:18 +00:00
Sam Leffler
0b28f08125 correct type to silence const complaint 2007-02-27 17:03:22 +00:00
Sam Leffler
30705853b0 unbreak create operation, must copy argument to global name
Spotted by:	des
2007-02-27 17:00:59 +00:00
Alex Dupre
65835cf341 Call the multipath device with its real name. 2007-02-27 08:56:11 +00:00
Christian Brueffer
eb6cb8953e First cleanup pass: new sentence -> new line, typos fixed, some markup
errors fixed.
2007-02-27 07:53:20 +00:00
Matt Jacob
a5e9bfc6f9 Add a man page. 2007-02-27 07:29:15 +00:00
Kirk McKusick
3ec818266f Fix an error in dumping large sparse files containing extended attributes. 2007-02-27 07:28:17 +00:00
Matt Jacob
e770bc6bf5 First cut at GEOM based multipath. This is an active/passive{/passive...}
arrangement that has no intrinsic internal knowledge of whether devices
it is given are truly multipath devices. As such, this is a simplistic
approach, but still a useful one.

The basic approach is to (at present- this will change soon) use camcontrol
to find likely identical devices and and label the trailing sector of the
first one. This label contains both a full UUID and a name. The name is
what is presented in /dev/multipath, but the UUID is used as a true
distinguishor at g_taste time, thus making sure we don't have chaos
on a shared SAN where everyone names their data multipath as "Fred".

The first of N identical devices (and N *may* be 1!) becomes the active
path until a BIO request is failed with EIO or ENXIO. When this occurs,
the active disk is ripped away and the next in a list is picked to
(retry and) continue with.

During g_taste events new disks that meet the match criteria for existing
multipath geoms get added to the tail end of the list.

Thus, this active/passive setup actually does work for devices which
go away and come back, as do (now) mpt(4) and isp(4) SAN based disks.

There is still a lot to do to improve this- like about 5 of the 12
recommendations I've received about it,  but it's been functional enough
for a while that it deserves a broader test base.

Reviewed by: pjd
Sponsored by: IronPort Systems
MFC: 2 months
2007-02-27 04:01:58 +00:00
Kirk McKusick
772ad651bf Update the dump program to save extended attributes. Update
the restore program to restore all dumped extended attributes.

If the restore is running as root, it will always be able
to restore all extended attributes. If it is not running
as root, it makes a best effort to set them. Using the -v
command line flag or the `verbose' command in interactive
mode will display all the extended attributes being set on
files (and at the end on directories) that are being restored.
It will note any extended attributes that could not be set.

The extended attributes are placed on the dump image immediately
following each file's data. Older versions of restore can work
with the newer dump images. Old versions of restore will
correctly restore the file data and then (silently) skip
over the extended attribute data and proceed to the next file.

This resolves PR 93085 which will be closed once the code
has been MFC'ed.

Note that this code will not compile until these header
files have been updated: <protocols/dumprestore.h> and
<sys/extattr.h>.

PR:		bin/93085
Comments from:	Poul-Henning Kamp and Robert Watson
MFC after:	3 weeks
2007-02-26 08:15:56 +00:00
Sam Leffler
cb8c905ae9 use getifaddrs from libc instead of private code
Reviewed by:	bms
MFC after:	1 month
2007-02-24 23:55:46 +00:00
Pawel Jakub Dawidek
e739933759 Correct typo.
Spotted by:	Tomasz Dudzisz
2007-02-22 19:25:37 +00:00
Nick Hibma
7090e3d10c Kris suggested that swap is a better choice as a default than malloc.
MFC:	1 week
2007-02-20 22:04:23 +00:00
Nick Hibma
35ce0ff2f2 [Found the original diff I made, see previous commit for other part]
Assume '-a' and '-t malloc' flags for '-s <size>' (malloc ramdisk) if not
specified.

Reviewed by:	phk (some time ago)
MFC:		1 week
2007-02-20 21:29:30 +00:00
Nick Hibma
1253fe1ead Make attach the default for -f. That way
mdconfig -f image

works like a charm.

Reviewed by:	phk (some time ago)
MFC:		1 week
2007-02-20 21:04:12 +00:00
Sam Leffler
aa388b9d49 correct type definition of option routine callback 2007-02-17 18:22:20 +00:00
Sam Leffler
a74d2fb50e remove (now) duplicate definition of IEEE80211_IS_CHAN_PASSIVE 2007-02-17 18:21:52 +00:00
Ceri Davies
032ae0f379 Grammar nits. 2007-02-15 21:49:32 +00:00
Matteo Riondato
de63bf714c Add examples for configuring and mounting geom_uzip(4) based disks'
image and sliced/partitioned memory disks.
MFC after:	1 week
2007-02-15 18:07:52 +00:00
Matteo Riondato
c72132f05f Correct -c and -d description.
Other requests made in the PR were already solved in the past.

PR:		bin/66763
MFC after:	1 week
2007-02-15 14:46:04 +00:00
Paolo Pisati
8c67c5a3f4 Mention the nat command in the synopsis and in the action section.
Approved by: glebius (mentor)
2007-02-15 14:32:26 +00:00
Matteo Riondato
8c6a98de69 Enhances mdmfs(8) to mount md-based device such as uzip.
Examples of use can be found in the PR text.

PR: 103501
MFC after:	1 week
2007-02-15 13:49:44 +00:00
Brian Somers
8428fde517 Default output to stdout as the man page suggests. 2007-02-14 23:22:33 +00:00
Brian Somers
30e3c0fa25 Only go through our cylinder group and inode info when we need to.
This allows ``ffsinfo -o - -l1 /tmp'' to run a lot quicker.
2007-02-14 23:20:30 +00:00
Brian Somers
89f0730d6b Re-indent main() in preparation for further changes. 2007-02-14 23:12:32 +00:00
Christian Brueffer
5ab2dec31e Mark up lkm with .Nm, since lkm is name of an api.
Submitted by:	ru
2007-02-13 17:06:15 +00:00
Craig Rodrigues
8cb8959b11 Raise WARNS level to 6. 2007-02-13 05:39:38 +00:00
Pawel Jakub Dawidek
2e0f7f9fb0 Forgot to hook up gjournal manual page to the build.
Reminded by:	simon, piso
2007-02-10 17:59:46 +00:00
Christian Brueffer
47fa55cf93 Don't reference lkm(4), it doesn't exist.
PR:		108980
Submitted by:	Yonatan
2007-02-10 08:44:41 +00:00
Ed Maste
2fcc737008 Implement RFC3442, the Classless Static Route option.
The original DHCP specification includes a route option but it supports
only class-based routes.  RFC3442 adds support for specifying the netmask
width for each static route.  A variable length encoding is used to minimize
the size of this option.

PR:             bin/99534
Submitted by:   Andrey V. Elsukov <bu7cher@yandex.ru>
Reviewed by:    brooks
2007-02-09 17:50:26 +00:00
Ed Maste
a2d605f78c Add a $FreeBSD$ tag missing after the original import. Note that this
file isn't actually installed; the one in src/etc is.
2007-02-09 16:28:25 +00:00
Craig Rodrigues
5b54856414 Print warning that "-t msdos" is deprecated and being converted to
"-t msdosfs".  The conversion has been happening since 1.43, but
no equivalent conversion happens in "umount -t", which led to some
confusion with some users.

PR:		79296
Submitted by:	Nobuhiro Yasutomi <nobuhiro yasutomi nifty ne jp>
2007-02-06 05:57:40 +00:00
Bruce M Simpson
9bb9973c66 Be explicit in examples about the correct grammar for 'alias' and
'-alias', and that 'add' and 'delete are in fact synonyms for these
in the ifconfig(8) grammar.

Use network prefixes explicitly specified in IETF RFCs for
documentation purposes. (bz)

PR:		102701
MFC after:	1 day
See also:	RFC 3330, RFC 3849
Submitted by:	bz
2007-02-04 16:48:56 +00:00
Mike Pritchard
fbb42904c4 If two files systems, /a and /b are marked as having quotas enabled
in fstab and they are normally mounted as /a/b, if /b is not mounted,
the various quota utilities will incorrectly operate with the quotas on
/a (silently) when operations are attemted on /b.

Sync up all the hasquota() routines between all the different
quota utilities and change it to detect if the file system we are
attempting to perform quota operations on is not currently mounted
and warn the user accordingly.

PR:	bin/38918
2007-02-04 06:33:15 +00:00
Warner Losh
1a7bec91fb Patches to allow one to allow one to specify a directory to chroot to.
This includes support for running a script to setup that directory.
The kenv variables init_chroot and init_script control this behavior,
and are documented in loader(8) that's about to be committed (along
with the other variables like init_path...).

Submitted by: Oliver Fromme
Reviewed by: myself, jhb (earlier versions)
2007-02-04 06:33:13 +00:00
Mike Pritchard
db957a6fba Do not touch the block or i-node grace times for id 0.
These are used to indicate the default grace period for
the file system, and should not be touched by quotacheck.
2007-02-03 11:20:28 +00:00
Mike Pritchard
952a9714bd Fix quotqcheck to correctly use the curinode count, and not the
curblock count when checking if the inode soft limit has been
crossed.
2007-02-03 11:08:48 +00:00
Bruce M Simpson
1b153c9278 Backout revision 1.4; it is not verified as the correct fix for the PR.
A more correct fix has been committed to ifconfig(8).

Submitted by:	bz
PR:		102701
2007-02-03 03:40:33 +00:00
Bruce M Simpson
9bad5f3777 Add an EXAMPLES section to ifconfig(8), clearly showing how to configure
IPv6 addresses in FreeBSD.

See also: http://www.telscom.ch/index.php/downloads/configure_ipv6_features

MFC after:	1 week
PR:		102701
Obtained from:	OpenBSD (partly, with edits)
2007-02-03 03:37:37 +00:00
Pawel Jakub Dawidek
e9988ceda3 Use pidfile(3) API to restart mountd(8) on success mount.
This why we won't kill random process if there is a stale PID in
/var/run/mountd.pid.
2007-02-02 23:58:10 +00:00
Craig Rodrigues
f716c4e792 Remove, since code has been merged into mount_nfs,
and mount_nfs Makefile builds mount_nfs and creates a mount_nfs4 link to it.
2007-02-01 14:18:01 +00:00
Pawel Jakub Dawidek
51ca5b2182 Add gjournal(8) manual page. Documentation of kern.geom.journal.* sysctls
is still missing, ehh.

Reviewed by:	trhodes
2007-01-29 22:12:22 +00:00
Brooks Davis
a0b5cadc42 Actually implement rev 1.12 for host names and NIS domain names. We
were removing the invalid option, but still rejecting the lease.

Reported by:	Yoshihiko Sarumaru <mistral at imasy dot or dot jp>
2007-01-29 15:55:13 +00:00
Craig Rodrigues
578cfbaae8 Pass "errmsg" to nmount(), so that if nmount() fails, we can get
strings provided by vfs_mount_error().
2007-01-29 01:49:08 +00:00
Wilko Bulte
7a429ad443 typo: s/tranport layer/transport layer/
MFC after: 1 week
2007-01-28 21:34:07 +00:00
Craig Rodrigues
bfa47a3a5c Convert mount_ext2fs to a simple program which passes "-o option" to nmount(). 2007-01-28 00:51:01 +00:00
Peter Wemm
b7696cdf60 Remove unused reference to objformat.h 2007-01-25 22:38:58 +00:00
Mike Pritchard
d3caf029b5 Bump .Dd. 2007-01-25 19:54:03 +00:00
Mike Pritchard
4ae90ca534 Add a BUGS section that shows that ids that appear to be
negative are now ignored by the quota system and that extremely
large ids may make quotacheck run for a very long time.

Also mention that "options QUOTA" is required for the kernel
to provide quota support.
2007-01-25 12:42:18 +00:00
Pawel Jakub Dawidek
eeefa1fa7e When the following conditions are meet:
- First configured key is based only on keyfile (no passphrase).
- Device is attached.
- User changes first key (setkey) from keyfile to passphrase and doesn't
  specify number of iterations (with -i option).
...geli(8) won't store calculated number of iterations in metadata.
This result in device beeing unaccesable after detach.

One can recover from this situation by guessing number of iterations
generated, storing it in metadata and trying to attach device.
Recovery procedure isn't nice, but one's data is not lost.

Reported by:	Thomas Nickl <T.Nickl@gmx.net>
MFC after:	1 week
2007-01-25 11:44:03 +00:00
Pawel Jakub Dawidek
1378624c2e Implement gctl_change_param() function, which changes value of existing
parameter.

MFC after:	1 week
2007-01-25 11:35:27 +00:00
Craig Rodrigues
1f294570c0 Remove mount_nfs4 from SUBDIR list. The mount_nfs Makefile
links mount_nfs to mount_nfs4 now.
2007-01-23 09:18:25 +00:00
Craig Rodrigues
0d27250907 Link mount_nfs -> mount_nfs4, and mount_nfs.8 -> mount_nfs4.8.
Suggested by:	rees
2007-01-23 09:14:33 +00:00
Craig Rodrigues
0c269d1f05 Merge mount_nfs4.c and mount_nfs.c into one program.
If argv[0] == "mount_nfs4", then default to mounting NFSv4,
otherwise if argv[0] == "mount_nfs", default to the old mount_nfs behavior.

- Add a -4 option.
- Add the University of Michigan copyright from mount_nfs4.c, for the
  code merged from mount_nfs4.c.

Reviewed by:	rees
2007-01-23 07:17:10 +00:00
Mike Pritchard
3767552454 Use fseeko to seek in the file, instead of fseek to prevent seek
errors for extremely large uids (e.g. in the billions range).
2007-01-23 02:13:00 +00:00
Mike Pritchard
b32c2af199 Make sure that unknown uids/gids that now have non-zero usage and
had a previously recorded usage of zero are correctly displayed in
verbose mode.  Generalize the print routine a little too.
2007-01-23 02:10:19 +00:00
Marius Strobl
98b0eedaf5 Actually fully emulate NetBSD and print the media instance number
only for non-zero instances so the typical output for IFM_IEEE80211
type media doesn't overflow 80 columns.

Requested by:	sam
2007-01-22 13:42:07 +00:00
Mike Pritchard
f01beaa692 Quota system cleanup.
1) Do not account for uids/gids that appear negative to prevent
   the creation of 131GB+ quota files.  This is the same as the kernel
   now determines which files to provide quota accounting for.
   Related to PR kern/38156.  This should also prevent boots from
   hanging if a negative uid appears in the file systems.
2) Do not count system files in the usage counts.  These currently are
   file system snapshot and quota data files.  This is how the kernel
   now handles those files.
3) Correctly generate new quota data files if the current files
   do not exist or are zero length in size.  PR kern/30958.
   It should now be possible to newfs / mount / touch quota.{user,group}
   and quotaon a file system and have everything work.
4) Change some diagnostics to report the file system and type of
   id (uid or gid) that is being reported.
5) Truncate the quota data files if possible, instead of letting
   them grow to a big enough size to hold the largest UID/GID on
   the system (typically "nobody").  The kernel should now be able to
   grow the files as needed without deadlocking the system.

PR:  kern/30958, kern/38156
2007-01-20 12:28:15 +00:00
Marius Strobl
1113949379 - Display the media instance numbers and allow the user to set the active
one. This is based on NetBSD but unlike NetBSD this implementation prints
  the instance number for all media instances and doesn't skip it for the
  first one as I don't see a reason to suppress it except for the vague
  reason to preserve the output for single-instance configurations.
- Fix some whitespace nits.
2007-01-20 00:56:49 +00:00
Sam Leffler
9a71a3d565 Add initial support for 900MHz channels; still has some rough
edges but ifconfig ath0 list chan works and you can use ieee
channel #'s to lock/select a channel.

MFC after:	1 month
2007-01-15 01:20:28 +00:00
Max Laier
c2221c3536 Fix a parsing bug when specifying more than one address with dotted decimal
netmask.

Reported by:	Igor Anishchuk
PR:		kern/107565
MFC after:	3 days
2007-01-07 03:02:02 +00:00
Craig Rodrigues
f234fd6325 Fix parsing of -o uid and -o gid options, so that -o uidxx and -o gidxx
are not accepted.

Submitted by:	daichi, Masanori OZAWA <ozawa ongs co jp>
2007-01-05 02:54:27 +00:00
Ralf S. Engelschall
8313a4905c fix typo: "adaptor" -> "adapter" 2007-01-02 21:00:45 +00:00
Ralf S. Engelschall
7090a0c6be Fix typo: effected -> affected
Submitted by: Gordon Stratton <tsr2600 (at) gmail (dot) com>
2007-01-02 09:12:37 +00:00
Hiroki Sato
6afa5649bf Fix wrong markup and some wordsmithing.
Submitted by:	ru
2006-12-31 15:36:44 +00:00
Paolo Pisati
ff2f6fe80f Summer of Code 2005: improve libalias - part 2 of 2
With the second (and last) part of my previous Summer of Code work, we get:

-ipfw's in kernel nat

-redirect_* and LSNAT support

General information about nat syntax and some examples are available
in the ipfw (8) man page. The redirect and LSNAT syntax are identical
to natd, so please refer to natd (8) man page.

To enable in kernel nat in rc.conf, two options were added:

o firewall_nat_enable: equivalent to natd_enable

o firewall_nat_interface: equivalent to natd_interface

Remember to set net.inet.ip.fw.one_pass to 0, if you want the packet
to continue being checked by the firewall ruleset after being
(de)aliased.

NOTA BENE: due to some problems with libalias architecture, in kernel
nat won't work with TSO enabled nic, thus you have to disable TSO via
ifconfig (ifconfig foo0 -tso).

Approved by: glebius (mentor)
2006-12-29 21:59:17 +00:00
Bjoern A. Zeeb
3ca72aeb09 Fix an off-by-one which could mean writing beyond the end of the array
when copying the interface name.
This code part should probably be rewritten.
2006-12-29 18:44:04 +00:00
Ruslan Ermilov
f9530cf087 - Fix markup.
- Somewhat improve wording.

- Change the layout of the EXAMPLES section so that descriptions
  come before example, as in most other manpages.

- Fix a bad example that edits a label using a `c' partition.
2006-12-29 16:28:38 +00:00
Sam Leffler
b0eb2f6935 Add half/quarter rate 11a channel support:
o add hack/nonstandard channel mapping for public safety band channels to
  mirror kernel (temporary until we have proper 802.11 state)
o change ieee80211_mhz2ieee to take channel flags (unused right now)

While here do some minor fixups like using IEEE80211_IS_CHAN_ANYG.
2006-12-27 18:48:50 +00:00
Ceri Davies
32ef7e9ba8 Remove duplicate "clear" subcommand.
PR:		docs/106947
Submitted by:	TAOKA Fumiyoshi
2006-12-21 18:30:23 +00:00
Jung-uk Kim
f7c6b0a8c6 Clear full-duplex when half-duplex flag is set. This actually makes
'mediaopt half-duplex' working as it should.  It is now equivalent of
'-mediaopt full-duplex'.
2006-12-19 22:50:49 +00:00
Pawel Jakub Dawidek
15c7f46bcf For consistency use 'unsigned' instead of 'u_int'. 2006-12-18 11:12:00 +00:00
Pawel Jakub Dawidek
905cd66703 Fix ggated for platforms with 64bit size_t. The DIOCGSECTORSIZE ioctl
returns u_int.

Reported by:	Javier Martín Rueda <jmrueda@diatel.upm.es>
PR:		amd64/91799
MFC after:	3 days
2006-12-15 18:16:47 +00:00
Ruslan Ermilov
75cb6f3da0 - Document -u, -i, and the difference between them better.
- Remove some historical notes about "future" decisions.
2006-12-12 15:26:25 +00:00
Andrew Thompson
787096051b These days P2P means peer-2-peer (also well known from serveral filesharing
protocols) while PointToPoint has been PtP links. Change the variables
accordingly while the code is still fresh and undocumented.

Requested by:	bz
2006-12-11 23:46:40 +00:00
Warner Losh
f195a1221f Style: Shorten a couple of lines with u_int and u_long. 2006-12-10 06:36:41 +00:00
Sam Leffler
0972edc076 fix handling of ssid "-" etc; we're writing 1 byte past the
end of the result buffer

Noticed by:	Sepherosa Zieha
Reviewed by:	cperciva
MFC after:	2 weeks
2006-12-09 20:11:55 +00:00
Ruslan Ermilov
6028403f2e Document the following change in behavior:
: fdisk.c revision 1.74
: date: 2004/06/14 07:21:19;  author: phk;  state: Exp;  lines: +3 -3
: Make fdisk initialize the first instead of the last slice by default.
2006-12-08 21:50:48 +00:00
Craig Rodrigues
011b5486c5 Pass a char buffer parameter with name "errmsg" to nmount().
For filesystems which use vfs_mount_error() to log an error, this
char buffer will be populated with a string error message.
If nmount() fails, in addition to printing out strerror(errno),
print out the "errmsg" populated by vfs_mount_error().
2006-12-07 03:24:43 +00:00
David Malone
cbc8bb98ef Add a "-D" flag to restore which puts it into "degraded" mode. This
makes restore less efficient, but it makes a bigger effore to read
corrupted dumps. Specifiacally, when in degreded mode:

	1) Restore shifts the input by 1 byte if it sees a problem,
	rather than one tape block.
	2) It doesn't assume the inodes are stored in ascending order.
	3) It turns some panics into warning printfs.

We also verify some fields more carefully than before.

There's probably more a degreded mode could do, but this seems to
help a lot.

Approved by:	imp, iedowse, mckusick
MFC after:	3 weeks
2006-12-05 11:18:51 +00:00
Maxim Konovalov
02f3691e93 o Correct a function prototype. 2006-12-04 14:05:42 +00:00
Matt Jacob
3623222e67 It's confusing to say that "Command Queueing Supported" just based
upon the scsi flag validity field. Instead, just say "Command Queueing Enabled"
when it is- otherwise remain mute.
2006-12-03 07:11:55 +00:00
Craig Rodrigues
d00947d83a Many, many thanks to Masanori OZAWA <ozawa@ongs.co.jp>
and Daichi GOTO <daichi@FreeBSD.org> for submitting this
major rewrite of unionfs.  This rewrite was done to
try to solve many of the longstanding crashing and locking
issues in the existing unionfs implementation.  This
implementation also adds a 'MASQUERADE mode', which allows
the user to set different user, group, and file permission
modes in the upper layer.

Submitted by:	daichi, Masanori OZAWA
Reviewed by:	rodrigc (modified for minor style issues)
2006-12-02 19:35:56 +00:00
Craig Rodrigues
a6b2640236 Pass a string buffer named "errmsg" to nmount().
This will allow the NFS mount code to return a string error message
in addition to returning an error integer value.

Reviewed by:    mohans
MFC after:      1 month
2006-11-29 00:46:30 +00:00
Craig Rodrigues
412ffff0a0 Deduce the "fstype" parameter to pass to nmount() by looking at
the "_nfs" part of argv[0].  This should facilitate unifying mount_nfs
and mount_nfs4 into one binary.

MFC after:	1 month
Reviewed by:	mohans
2006-11-29 00:41:44 +00:00
Ruslan Ermilov
bad4d172b4 - Revert signedness type changes to "struct vmtotal"; by making
them unsigned I made the possible overflows hard to detect,
  and it only saved 1 bit which isn't principal, even less now
  that the underlying issue with the total of virtual memory has
  been fixed.  (For the record, it will overflow with >=2T of
  VM total, with 32-bit ints used to keep counters in pages.)

- While here, fix printing of other "struct vmtotal" members
  such as t_rq, t_dw, t_pw, and t_sw as they are also signed.

Reviewed by:	bde
MFC after:	3 days
2006-11-28 12:46:02 +00:00
Andrew Thompson
153f9b00f3 Add descriptions for p2p and autop2p. 2006-11-27 21:59:04 +00:00
Ceri Davies
85606c18b8 Bump .Dd for r1.127. 2006-11-27 21:54:46 +00:00
Andrew Thompson
75ba43386e Show the MAC address cache size and timeout. 2006-11-27 20:52:57 +00:00
Andrew Thompson
1dfd31abfb Keep the command name the same as the values display name in ifconfig. 2006-11-27 20:18:43 +00:00
Andrew Thompson
6c32e05ca3 Sync with the OpenBSD port of RSTP
- use flags rather than sperate ioctls for edge, p2p
 - implement p2p and autop2p flags
 - define large pathcost constant as ULL
 - show bridgeid and rootid in ifconfig

Obtained from:	Reyk Floeter <reyk@openbsd.org>
2006-11-27 00:35:40 +00:00
Ruslan Ermilov
8af480aec1 - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
Ruslan Ermilov
20739dfa44 Fix the format specifier suitable for uintmax_t. 2006-11-23 11:51:23 +00:00
Craig Rodrigues
6c53d0c51b Detach mount_devfs, mount_ext2fs, mount_fdescfs, mount_procfs,
mount_linprocfs, and mount_std from the build.  They are no longer
used, and can be replaced with "mount -t fstype".
2006-11-22 22:58:10 +00:00
Joseph Koshy
f7eaf827ab Cross-reference nextboot(8).
MFC after:	3 days
2006-11-22 13:12:34 +00:00
Craig Rodrigues
852bc770e3 Increase WARNS to 3. 2006-11-21 02:01:33 +00:00
Craig Rodrigues
b535b298b1 Fix last element of nc_protos[] array to appease GCC. 2006-11-21 02:00:48 +00:00
Craig Rodrigues
c5aa1dc845 Convert mount_nfs from old mount(2) API to new nmount(2) API.
Reviewed by:	mohans
2006-11-21 01:53:18 +00:00
Ruslan Ermilov
5c88a11e6e - Fix types of "struct vmmeter" members so they are unsigned.
- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
  when printing values of "struct vmmeter" in kilobytes as
  they don't necessarily fit into 32 bits.  (Fix sysctl(8)
  reporting of a total virtual memory; it's in pages too.)
2006-11-20 16:04:41 +00:00
Craig Rodrigues
c195c7f618 Fix debugging output of '-d', to more accurately reflect if
we exec an external mount program, or just call nmount()
to mount a filesystem.

Noticed by:	kris
2006-11-14 01:07:42 +00:00
Andrew Thompson
3df7fad0cf Add a new address cache type called sticky. On an interface marked sticky any
address learned by the bridge is made permanent, the address will not age out
and most importantly will not migrate to another interface.

This can be used to stop mac address poisoning or clients roaming in much the
same way as static entries without the hassle of preloading the table.
2006-11-09 06:32:38 +00:00
Ceri Davies
bbb83feb32 Document the -l option.
Reviewed by:	brd
Approved by:	ru (mentor)
2006-11-07 19:07:52 +00:00
Daniel Gerzo
ef63af0fd2 - I forgot to bump a date.
Approved by: keramida (mentor), trhodes (mentor) (implicit)
2006-11-05 20:12:32 +00:00
Daniel Gerzo
2242569921 - add some files to FILES section and provide their description
- reference devfs.conf and devfs.rules in SEE ALSO section

Approved by: keramida (mentor), trhodes (mentor)
PR: docs/103347
MFC-after: 3 days
2006-11-05 19:37:27 +00:00
Tom Rhodes
a4fff644c3 Sync up with rhyolite routed 2.31 which fixes the handling of varargs.
Remove -p from usage, it's gone completely now.

PR:		83387
Submited by:	arved
2006-11-05 14:49:47 +00:00
Ruslan Ermilov
957d7c8f9c Remove the -C option as it does more harm than good. To be fully
compatible, it would have to (at least):

- support the "compat-compat" -T option,
- *not* support the -l, -O, and -v options,
- default to soft updates being disabled.

Worse, the compatibility mode makes it impossible to mount_mfs(8)
a file system from fstab(5) with soft updates disabled (-S).  [1]

Now, the only difference when called as "mount_mfs" or "mfs" (as
opposed to "mdmfs") is that the file mode of the mount point is
set by default to 01777.  All options available to mdmfs(8) are
also available to mount_mfs(8); the -C option is still recognized
but ignored for backward compatibility.

PR:		bin/98860 [1]
MFC after:	2 weeks
2006-11-03 12:02:24 +00:00
Ceri Davies
42db1b70c5 Bump .Dd for -f|-F. 2006-11-02 10:44:02 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Pawel Jakub Dawidek
501250ba60 Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.
2006-11-01 22:51:49 +00:00
Pawel Jakub Dawidek
aee5398c29 G_TYPE_NONE was replaced with G_TYPE_BOOL. 2006-11-01 22:28:11 +00:00
Ruslan Ermilov
1675d675a7 Fix -fstrict-aliasing warning. 2006-11-01 10:56:33 +00:00
Pawel Jakub Dawidek
6634ef3651 Fix powerpc build.
Reported by:	Peter Grehan <grehan@freebsd.org>
2006-11-01 09:22:33 +00:00
Andrew Thompson
3fab76690c Bring in support for the Rapid Spanning Tree Protocol (802.1w).
RSTP provides faster spanning tree convergence, the protocol will exchange
information with neighboring switches to quickly transition to forwarding
without creating loops. The code will default to RSTP mode but will downgrade
any port connected to a legacy STP network so is fully backward compatible.

Reviewed by:	syrinx
Tested by:	syrinx
2006-11-01 09:07:47 +00:00
John Baldwin
b54a17cd2f Whitespace and style nits. 2006-10-31 22:36:49 +00:00
Pawel Jakub Dawidek
f348204c94 Hook up gjournal bits to the build.
Sponsored by:	home.pl
2006-10-31 22:22:30 +00:00
Pawel Jakub Dawidek
1a39ef9574 Forgot to add file with gjournal specific fsck code.
Sponsored by:	home.pl
2006-10-31 22:21:01 +00:00
Pawel Jakub Dawidek
fffbc2a500 Update after function renames.
Sponsored by:	home.pl
2006-10-31 22:07:29 +00:00
Pawel Jakub Dawidek
aef8d2449b Implements gjournal support. If file system has gjournal support enabled
and -p flag was given perform fast file system checking (bascially only
garbage collecting of orphaned objects).

Rename bread() to blread() and bwrite() to blwrite() as we now link to
the libufs library, which also implement functions with that names.

Sponsored by:	home.pl
2006-10-31 22:06:56 +00:00
Pawel Jakub Dawidek
5a9dc069e0 Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.
Sponsored by:	home.pl
2006-10-31 22:02:24 +00:00
Pawel Jakub Dawidek
ac88569c5a Teach mount(8) about MNT_GJOURNAL flag.
MNT_GJOURNAL flag is not a mount-time flag, but it is needed to show
'gjournal' option in mount(8) output.

Sponsored by:	home.pl
2006-10-31 21:54:51 +00:00
Pawel Jakub Dawidek
868c68ed1d Add -J flag to both newfs(8) and tunefs(8) which allows to enable gjournal
support.
I left -j flag for UFS journal implementation which we may gain at some
point.

Sponsored by:	home.pl
2006-10-31 21:52:28 +00:00
Pawel Jakub Dawidek
bd7f6c2999 Add userland control utility for gjournal GEOM class.
Sponsored by:	home.pl
2006-10-31 21:32:54 +00:00
Pawel Jakub Dawidek
a930f272de - Handle timeouts from recv(2) properly.
- Increase timeout to 8 seconds (should be made configurable).

Reported by:	Ulrich Spoerlein <uspoerlein@gmail.com>
Reported by:	Christian Laursen <xi@borderworlds.dk>
PR:		kern/104829
MFC after:	1 week
2006-10-30 18:29:24 +00:00
Ruslan Ermilov
49a41c4f52 Two tiny style fixes. 2006-10-24 22:16:51 +00:00
Ruslan Ermilov
3cbf527e8d Revert rev. 1.86 by jmallett@ as it breaks "ro" mounts specified
in /etc/fstab.

This has been happening due to the priority inversion; options
specified on the command line should take precedence over options
from fstab over default "noro" option, but since both the default
"noro" and options specified on the command line (-w, -r, -o ...)
were put into the same "options" variable, "noro" took precedence
over fstab "ro" (this is easily visible with "mount -d").

PR:		bin/100164
2006-10-24 22:02:29 +00:00
Ruslan Ermilov
f8553712c4 Fix the description of "media-type". 2006-10-24 20:20:41 +00:00
Ruslan Ermilov
cc17b04460 If not compiled for debugging, redirect standard input/output/error
to /dev/null before becoming a daemon.
2006-10-23 10:48:19 +00:00
Ruslan Ermilov
ebd1e4e6b8 Revise the markup, sort sections, fix some grammar bugs.
Not fixed: the description of media-type is completely bogus.
2006-10-21 17:15:11 +00:00
Ruslan Ermilov
02f6fe9e59 Fix .Dd arguments. 2006-10-21 16:02:42 +00:00
Maxim Konovalov
f72bbf974b o '-s' flag was killed in rev. 1.75. Clean getopt(3).
PR:		bin/104616
Submitted by:	Oliver Fromme
MFC after:	1 week
2006-10-20 13:10:27 +00:00
Ceri Davies
f5f03635ac Hook up idmapd to the build, as the NFS4 client is not much use without
it.
2006-10-15 14:04:28 +00:00
Ceri Davies
122745bb9e .PATH isn't necessary here.
Remove hardcoded path to /usr/src/sys.
2006-10-15 13:51:49 +00:00
Ceri Davies
bd45807a22 Try to clarify that this daemon should run on the client machine.
Fix a .Xr.
2006-10-15 13:50:16 +00:00
Tom Rhodes
65fe4c0bfd Remove mention of "lomac" as it's been gone for a good while now (at least
two years).
2006-10-13 23:59:59 +00:00
Ruslan Ermilov
476bfbd7c7 - Don't mention (wrong) defaults for FFS file system parameters,
replace them with references to newfs(8) which documents them.

- Remove mentions of LFS support for which was retired in 1998.

- Regenerate an example output.

PR:		docs/84913
MFC after:	3 days
2006-10-13 15:44:29 +00:00
Ruslan Ermilov
6b0db4ab37 Fix utility's short description.
PR:		docs/84467
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2006-10-12 20:29:20 +00:00
Ruslan Ermilov
ef4e780539 Make "dump /filesystem" (without options) work.
PR:		docs/84408
MFC after:	3 days
2006-10-12 20:22:31 +00:00
Hartmut Brandt
d566310d21 Remove a debugging statement from the previous commit. 2006-10-12 15:44:51 +00:00
Hartmut Brandt
48cd487aae Don't free the buffer with the sysctl value before printing it. 2006-10-12 15:31:23 +00:00
Ruslan Ermilov
325301a75b Mention the -L option of dump(8) that can neutralize negative
effects of restoring dumps of live file systems.

PR:		docs/91297
2006-10-12 14:47:20 +00:00
Pawel Jakub Dawidek
360df38e5f Be sure to not create devices with (mediasize % sectorsize) != 0.
Reported by:	xride
MFC after:	1 week
2006-10-10 15:00:32 +00:00
Pawel Jakub Dawidek
2e0ca9c4a3 Be sure to not create device which 2006-10-10 14:58:21 +00:00
Ruslan Ermilov
dadff48394 Fix markup botched in previous commit. 2006-10-10 09:44:08 +00:00
Tom Rhodes
7a6f335e14 Note that the -v option may be used to expand long SSIDs.
PR:		102118
Reviewed by:	sam
2006-10-10 02:20:12 +00:00
Tom Rhodes
1cc7aa7d96 Add a note about rule syntax compared to the shell used so users do not get
frustraited when:
ipfw add 201 deny ip from any to table(2) in via xl1
returns "Badly placed ( )'s"

PR:	73638
2006-10-09 22:12:08 +00:00
Tom Rhodes
d24dde7544 Properly separate sentences by adding a semi-colon.
Hinted by:	bmah
2006-10-07 23:12:19 +00:00
John-Mark Gurney
e0c10c6e08 flesh out the devd.conf man page... Mostly from the PR, but did a couple
gramatical tweaks along w/ sorting the list, and adding that serial is
available for USB....

PR:		85097
Submitted by:	Fredrik Lindberg
MFC after:	1 week
2006-10-07 21:15:40 +00:00
Ruslan Ermilov
04c7da702f A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.
2006-10-06 08:27:07 +00:00
Giorgos Keramidas
223ccb5450 When addr/mask examples are given, show both a host and network
address, to avoid confusing the users that a full address is
always required.

Submitted by:   Josh Paetzel <josh@tcbug.org> (through freebsd-doc)
MFC after:	3 days
2006-10-04 19:29:05 +00:00
Marcel Moolenaar
c10b34ed19 Use strtoll(3) instead of strtol(3) for the starting block or
partition size. On 32-bit platforms sizeof(long) < sizeof(off_t)
and using strtol(3) would prevent partitions larger than 4G
sectors or beyond 4G blocks.

PR: bin/103991
MFC after: 3 days
2006-10-04 18:20:25 +00:00
Jens Schweikhardt
09a66bda90 Correct some grammos. 2006-10-02 08:55:54 +00:00
Matteo Riondato
e7e3ba9bbc The UFS filesystem get created only if -P was not specified.
Specify this on the description

MFC after:	3 days
2006-10-01 09:40:55 +00:00
Ruslan Ermilov
6b4674389d Revise markup. 2006-09-30 17:21:37 +00:00
Pawel Jakub Dawidek
5e527bc0c9 MFp4: G_TYPE_BOOL sounds much better than G_TYPE_NONE.
Changes:	98722
2006-09-30 14:40:50 +00:00
Pawel Jakub Dawidek
6fc6000883 MFp4:
- Print proper error message when argument is specified twice.
  Before the change it was detected properly, because of how
  G_OPT_DONE() macro worked.
- Use err(3) functions where appropriate.
- Add some assertions.
- Bump version number, because G_TYPE_BOOL addition breaks API and ABI.

Changes:	98721,98722,98723,101360,106985
2006-09-30 14:39:18 +00:00
Pawel Jakub Dawidek
710d02a403 Add __printflike() attribute to various functions. 2006-09-30 14:35:37 +00:00
Ruslan Ermilov
975d4c58c0 Markup nit. 2006-09-30 11:12:36 +00:00
Ruslan Ermilov
bfe56fe830 Revise markup. 2006-09-30 11:02:17 +00:00
Maxim Konovalov
c24384096d o Check for a required "pathname" argument presence.
PR:		bin/95146
Submitted by:	candy-sendpr@kgc.co.jp
MFC after:	3 weeks
2006-09-29 08:00:40 +00:00
Xin LI
3a6ab3de8d Explicitly say which gid do we use as a fallback, when operator
is not found.

Suggested by:	kensmith
2006-09-27 05:49:21 +00:00
Paolo Pisati
be4f3cd0d9 Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:

-made libalias modular:

 -support for 'particular' protocols (like ftp/irc/etcetc) is no more
  hardcoded inside libalias, but it's available through external
  modules loadable at runtime

 -modules are available both in kernel (/boot/kernel/alias_*.ko) and
  user land (/lib/libalias_*)

 -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
  skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru
2006-09-26 23:26:53 +00:00
Brooks Davis
ebe609b4a2 It is possible for bpf to return a length such that:
length != BPF_WORDALIGN(length)

This meeans that it is possible for this to be true:

	interface->rbuf_offset > interface->rbuf_len

Handle this case in the test for running out of packets.  While
OpenBSD's solution of setting interface->rbuf_len to
BPF_WORDALIGN(length) is safe due to the size of the buffer, I think
this solution results in less hidden assumptions.

This should fix the problem of dhclient running away and consuming 100%
CPU.

PR:		bin/102226
Submitted by:	Joost Bekkers <joost at jodocus.org>
MFC after:	3 days
2006-09-26 01:02:02 +00:00
Bruce M Simpson
7d9079197c Fix a typo in af_inet6.c such that IPv6 addresses may be deleted
from interfaces.

PR:		bin/102701
Submitted by:	George Mitchell
MFC after:	3 days
2006-09-25 18:20:56 +00:00
Andre Oppermann
6b92a00668 In setifcap() only set/unset those capabilities the interface actually
supports.
2006-09-20 15:38:37 +00:00
Ruslan Ermilov
8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Ruslan Ermilov
5ef35a9854 Add -f option to program's usage(), fix manpage's SYNOPSIS. 2006-09-17 22:49:26 +00:00
Christian Brueffer
b94ebe0fad Remove a contraction and add a missing article. 2006-09-17 11:30:44 +00:00
John Hay
268f526c05 Check the length of the ipv4 and ipv6 address lists. It must be less
than F_LEN_MASK.

MFC after:	5 days
2006-09-16 19:27:40 +00:00
Pawel Jakub Dawidek
1650d24936 Fix copy&paste mistake.
Submitted by:	Matthias Lederhofer <matled@gmx.net>
2006-09-16 10:47:30 +00:00
Pawel Jakub Dawidek
8abd1ad101 Add 'configure' subcommand which for now only allows setting and removing
of the BOOT flag. It can be performed on both attached and detached
providers.

Requested by:	Matthias Lederhofer <matled@gmx.net>
MFC after:	1 week
2006-09-16 10:43:17 +00:00
Pawel Jakub Dawidek
7330b46e36 Note that we don't destroy keys on read-only attached providers.
MFC after:	1 week
2006-09-16 09:27:54 +00:00
Pawel Jakub Dawidek
301b9004a9 First kill detached providers, because of two reasons:
- after killing all attached providers, all providers are then detached
  and operation is repeated for those who were attached,
- we don't want to remove keys for read-only attached providers, we only
  want to detach them.

MFC after:	1 week
2006-09-16 09:26:57 +00:00
John Hay
e7f2ec5364 Use bzero() to clear the whole ipfw_insn_icmp6 structure in fill_icmp6types(),
otherwise this command

ipfw add allow ipv6-icmp from any to 2002::1 icmp6types 1,2,128,129

turns into icmp6types 1,2,32,33,34,...94,95,128,129

PR:		102422 (part 1)
Submitted by:	Andrey V. Elsukov <bu7cher at yandex.ru>
MFC after:	5 days
2006-09-16 06:34:30 +00:00
Dag-Erling Smørgrav
7410947271 Fix markup snafu.
Spotted by:	ru
2006-09-14 13:47:55 +00:00
Philippe Charnier
d402d62c89 Reduce the number of errors under WARNS=6 2006-09-13 04:50:44 +00:00
Philippe Charnier
9833aeada2 Add FBSDID, rename local variable time to not conflict with time() 2006-09-12 17:54:35 +00:00
David E. O'Brien
f8c9c51988 Fix the manual build. 2006-09-10 08:58:47 +00:00
Daniel Gerzo
d6649c2569 Re-word the description of the "async" flag.
Suggested by: Milos Vyletel (mv@rulez.sk)
Reviewed by: ru
Approved by: keramida (mentor), trhodes (mentor)
2006-09-08 13:47:39 +00:00
Andre Oppermann
581d6e4ca7 Fix octal representation of TSO4 and TSO6 bits in interface capabilities
description.
2006-09-08 13:29:38 +00:00
Pawel Jakub Dawidek
6a146a1989 - Split failure probability configuration into read failure probability and
write failure probability.
- Allow to specify an error number to return of failure.

MFC after:	3 days
2006-09-08 09:21:21 +00:00
Andre Oppermann
d7097da403 Make TSO (TCP segmentation offload) capabilities visible and accessible with
'ifconfig em0 tso' and 'ifconfig em0 -tso'.  TSO for IPv4 and IPv6 is always
enabled or disabled together.  The driver may enable only one if it doesn't
support both.

Document 'tso' and '-tso' in the ifconfig(8) man pages.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-06 22:07:14 +00:00
Ruslan Ermilov
ccf2597759 While convenient, avoid using alloca() for reasons specified in
the BUGS section of the alloca(3) manpage.  In particular, when
the number of TCP sockets is several tens of thousand, trying to
"sysctl -a" would SIGSEGV on the net.inet.tcp.pcblist entry (it
would exceed the stacksize ulimit, in an undetectable manner).

Reported by:	Igor Sysoev
2006-09-06 20:15:43 +00:00
Hajimu UMEMOTO
d45564dcfe Support Celsius (nn.nC), Fahrenheit (nn.nF) and Kelvin (nnnn) to
specify temperature.

Reviewed by:	njl
MFC after:	3 days
2006-09-03 15:10:04 +00:00
Maxim Konovalov
0e6d65d1fd o Fix style(9) for previous. 2006-08-25 09:14:23 +00:00
Maxim Konovalov
ac5cc9e9bc A bunch of fixes from NetBSD:
o Restore owner/group/mode/atime/mtime of symbolic links, rev. 1.30.
o Extract file flags of symbolic link, rev. 1.42.
o Call getfile() before altering file attributes.
  Open file with mode 0600 instead of 0666 so that file won't remain
  group or world readable/writable even if getfile() terminated.
  Move skipfile() before altering file attributes in IF{CHR,BLK} and
  IFIFO case for symmetry, rev. 1.32.
o Use file mode 0600 when creating special file or fifo, revs. 1.33, 1.34.

o Remove redundant -N check.

PR:		bin/101660
Submitted by:	Andrey V. Elsukov
Obtained from:	NetBSD, enami@netbsd
MFC after:	6 weeks
2006-08-25 05:46:47 +00:00
Ceri Davies
c4c6a6c2b5 Add a note that the btime command only works on UFS2.
Suggested by: maxim (who had also done the btime patch independently).
2006-08-24 09:14:02 +00:00
Ceri Davies
96dd636028 Allow fsdb to manipulate the birthtime entries on UFS2.
Approved by:	jhb
MFC after:	1 month
2006-08-23 22:44:00 +00:00
David Malone
cb0bfd9b89 A pipe bandwidth of 10MBits/s should probably
be understood as    10Mbits/s not 10MBytes/s.

Submitted by:	Gavin McCullagh <gavin.mccullagh@nuim.ie>
MFC after:	1 week
2006-08-23 14:29:18 +00:00
Thomas Quinot
68e160886a (media_status): Factor common code between IFM_ETHER and IFM_ATM cases.
(print_media_word, print_media_word_ifconfig): Remove unnecessary
goto following test for null desc.

PR:		bin/102354
Submitted by:	Ricardo Nabinger Sanchez <rnsanchez@gmail.com>
MFC after:	1 week
2006-08-22 23:49:36 +00:00
Ruslan Ermilov
2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Brian Somers
3dd3357a13 Revert the addition of -p. It's flawed in that dhclient should not run
on an interface without carrier.  devd should be used instead to handle
link up/down events.

Put on the right path by:	brooks, sam
2006-08-21 16:31:31 +00:00
Kenneth D. Merry
42cb6a80b6 Implement 'camcontrol reportluns'. This allows users to send the SCSI
REPORT LUNS command to a device.

camcontrol.[c8]:	Implement reportluns.  This tries to print the LUNs
			out in a reasonable format.  Only the periph
			addressing method has been tested, since very little
			hardware that I know of supports the other methods.

scsi_all.[ch]:		Revamp the report luns CDB structure and helper
			functions.  This constitutes a little bit of an API
			change, but since the old CDB length was 10 bytes,
			and the REPORT LUNS CDB length is actually 12 bytes,
			it's clear that no one was using this API in the
			first place.

MFC After:	1 week
2006-08-21 13:24:50 +00:00
David Malone
e28cb02537 Regigle parens to try and get the intended affect. This should fix people
having trouble with the "me6" keyword. Also, we were using inet_pton on
the wrong variable in one place.

Reviewed by:	mlaier (previous version of patch)
Obtained from:	Sascha Blank (inet_pton change)
MFC after:	1 week
2006-08-20 20:10:36 +00:00
Julian Elischer
1b97421aae Fix typo. 2006-08-20 05:42:58 +00:00
Julian Elischer
afad78e259 comply with style police
Submitted by:	ru
MFC after:	1 month
2006-08-18 22:36:05 +00:00
Julian Elischer
c487be961a Allow ipfw to forward to a destination that is specified by a table.
for example:
  fwd tablearg ip from any to table(1)
where table 1 has entries of the form:
1.1.1.0/24 10.2.3.4
208.23.2.0/24 router2

This allows trivial implementation of a secondary routing table implemented
in the firewall layer.

I expect more work (under discussion with Glebius) to follow this to clean
up some of the messy parts of ipfw related to tables.

Reviewed by:	Glebius
MFC after:	1 month
2006-08-17 22:49:50 +00:00
Brian Somers
4fdeb33466 Bump the document date. s/dhclient/.Nm/
Suggested by: ru
2006-08-17 20:11:21 +00:00
Brian Somers
43cb852dc0 Correct usage() 2006-08-17 17:27:42 +00:00
Brian Somers
9341e8dd88 Add a -p switch to dhclient. The switch tells dhclient to persist
despite the interface link status.

Add dhclient_flags_iface and background_dhclient_iface rc.conf options.
(where iface is a specific interface).  These can be used to give
interface specific flags to dhclient.

Reviewed by:	brooks@
2006-08-17 17:12:27 +00:00
Alexander Kabaev
5869a34acd Regularly scheduled patch to unbreak regularly scheduled post-ipfilter
buildworld breakage.

Exclude loglevel.c from the build. It does not appear to be used by
anything in the tree and buildworld succeeds just fine without it.
2006-08-17 03:19:38 +00:00
Julian Elischer
3095bda433 Take IP_FIREWALL_EXTENDED out of the man page too.
MFC after: 1 week
2006-08-17 00:46:06 +00:00
Thomas Quinot
72408a122a Clarify documentation of '-L' command line switch: the snapshot is
unlinked as soon as the dump starts (and removed when the dump is
completed, and the dump process exits). Previous wording was confusing
because users might expect the snapshot to be visible in the .snap
subdirectory while dump is running.

MFC after:	1 week
2006-08-16 16:28:30 +00:00
Guido van Rooij
4614227334 Adapt to ipf 4.1.13 2006-08-16 12:25:00 +00:00
Matt Jacob
90bdcf6bdc If rawname returns NULL, deal with it appropriately.
PR:		94045
Submitted by:	Andrey Elsukov
MFC after:	1 week
2006-08-15 17:53:37 +00:00
Ruslan Ermilov
e556ec911a Fix printing of integer Kelvins broken in rev. 1.71, which is
fatal on sizeof(int) != sizeof(long) systems (such as amd64).

MFC after:	1 day
2006-08-15 13:32:39 +00:00
Dima Dorfman
aa822c3979 Print packet loss figures with one decimal place. ping6 already does
this, and OpenBSD and NetBSD pings do it too. This is primarily useful
for comparing low levels of packet loss.
2006-08-14 07:54:17 +00:00
David E. O'Brien
c157a036a9 Add an extension to the UINT & ULONG types. The XINT & XLONG types behave
the same, except sysctl(8) will print out the values in hex.
2006-08-12 23:33:10 +00:00
Yaroslav Tykhiy
fdaff6559d Restore the "plumb" compatibility command, which was lost
due to the recent change by sam@ to clone operations in ifconfig(8).
2006-08-12 18:07:17 +00:00
Sam Leffler
76f6413d65 fixup list station support:
o add sanity check to avoid possible looping
o use intended api for IEEE80211_IOC_STA_INFO
o when operating in sta mode get the sta info for the ap
2006-08-10 06:06:13 +00:00
Maxim Konovalov
939b8dd67a o Spell.
Submitted by:	ru
2006-08-10 01:13:38 +00:00
Maxim Konovalov
5c5effc42f o Strip eol whitespaces. 2006-08-09 19:41:34 +00:00
Maxim Konovalov
cc163b19c0 o New sentence, new line.
o Touch Dd for -r.
2006-08-09 18:35:31 +00:00
Pawel Jakub Dawidek
850590166f Allow geli to operate on read-only providers.
Initial patch from:	vd
MFC after:		2 weeks
2006-08-09 18:11:14 +00:00
Pawel Jakub Dawidek
7fd26f86d1 Add missing #. 2006-08-07 20:09:09 +00:00
Dmitry Morozovsky
be0ee8b315 Eliminate a pair of unneeded parentheses slipped in from previous version of
fix.

Noticed by:	ru
2006-08-06 14:23:50 +00:00
Dmitry Morozovsky
432aab8c8e strlen(3) returns size_t, which is not strictly equivalent to int an 64-bit
archs, hence printf(3) warning.  Fix this.

Noticed by:	tinderbox
Approved by:	rse
2006-08-06 08:37:46 +00:00
Stefan Farfeleder
299652afbc Use the SLIST_NEXT macro instead of sle_next.
Checked with:	cmp(1)
2006-08-05 13:58:50 +00:00
Ralf S. Engelschall
452329ad11 Do not pass-through the tailing newline character from the ctime(3)
output to setproctitle(3) in order to get rid of the ugly two-character
escape sequence "\n" in the ps(1) output of a dump(8) process:

<< [...] finished in 0:00 at Sat Aug  5 14:44:39 2006\n (dump)
>> [...] finished in 0:00 at Sat Aug  5 14:44:39 2006 (dump)
2006-08-05 12:50:38 +00:00
Nate Lawson
091eb5a3db Use floating point instead of hacking something together. Suggested by
bde@.  Fix nearby int conversion and a couple style bugs.

MFC after:	1 day
2006-08-04 07:31:55 +00:00
Bruce M Simpson
d8f7093860 Block a variety of signals which may afffect reboot(8), before killing
init(8), to avoid losing a race to them and dying before being able
to call reboot(2).

PR:		bin/64664
Submitted by:	maxim
Obtained from:	NetBSD
MFC after:	30 days
2006-08-02 13:05:38 +00:00
Bruce M Simpson
b08d1553f4 Block SIGHUP before killing init(8), to avoid a race condition which may
kill the current process and hang the system when attempting reboot.

PR:		bin/64664
Reviewed by:	ssouhal, phk (historic)
MFC after:	30 days
2006-08-02 12:42:20 +00:00
Yaroslav Tykhiy
06cced4cce Add eye candy while I'm here: a blank line between
the license and the $FreeBSD$ line.
2006-07-27 18:28:14 +00:00
Yaroslav Tykhiy
b4a2047ac8 INET6 has no effect on rtsol, it's an IPv6-only tool with its
code independent of the macro.  This utility is just omitted
from the build as a whole by ../Makefile if MK_INET6 is set to false.

Pointed out by:	ume
Tested with:	cmp(1)
2006-07-27 17:56:57 +00:00
Yaroslav Tykhiy
144c917377 rtsol is just a stripped-down version of rtsold and as such it should
be built only if MK_INET6 is true: it's specific to IPv6.

Pointed out by:	ume
2006-07-27 17:50:05 +00:00
Yaroslav Tykhiy
064aa4479f These IPv6-only tools have no explicit dependency on the INET6 macro.
Tested with:	cmp(1)
2006-07-27 15:31:13 +00:00
Yaroslav Tykhiy
491bafe5c6 Obey MK_INET6_SUPPORT.
This is also a good chance to apply style.Makefile(5) in some cases.
2006-07-27 13:26:29 +00:00
Sam Leffler
d7ccef331a add beacon miss threshold control
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after:	2 weeks
2006-07-26 03:08:45 +00:00
Oleg Bulyzhin
84fd82e86f Specify correct argument range for tag/untag keywords.
Approved by:	glebius (mentor)
2006-07-25 11:07:31 +00:00
Nate Lawson
e05cdb7490 Fix printing of negative decimal values in Kelvin to Celsius conversion.
MFC after:	3 days
2006-07-25 02:28:43 +00:00
Stefan Farfeleder
6d04d8201d style.Makefile(5): Remove -Wall from CFLAGS. 2006-07-17 20:53:25 +00:00
Stefan Farfeleder
42e355872b Remove duplicated assignment. 2006-07-17 20:48:36 +00:00
Dag-Erling Smørgrav
4b4f91707c Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'.  It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd  / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by:	freebsd-rc
MFC after:	3 weeks
2006-07-12 16:05:51 +00:00
Sam Leffler
db82353d87 o replace special handling of clone operations by a clone callback
mechanism
o change vlan cloning to use callback and pass all vlan parameters
  on create using the new SIOCREATE2 ioctl
o update vlan set logic to match existing practice
2006-07-09 06:10:23 +00:00
Marcel Moolenaar
17a5febb88 Fix cut-n-paste bug: compare argument s against known aliases,
not the global optarg. This bug goes unnoticed because optarg
is so far always the actual argument for the formal argument s.
2006-07-07 02:44:23 +00:00
Jung-uk Kim
473c2d129b Send client identifier unconditionally. My ancient D-Link router response
with NACK if I don't set it.  Setting 'option dhcp-client-identifier' is
alternative but it is inconvenient because I have to keep the list of
all MAC addresses.  As bin/94743 pointed out, it is always sent from
Windows clients and I found Mac OS X does the same.

OK'd by:	brooks
2006-07-03 22:05:38 +00:00
Sam Leffler
97d7b28e83 remove display of the ERP ie from the list sta output (it's always
zero); replace it with station capabilities

MFC after:	1 month
2006-06-23 17:22:03 +00:00
Marcel Moolenaar
3e82a4a197 Improve support for Intel based Macs:
o  Accept hfs as partition type.
o  Print Apple HFS partitions using a friendly name.
2006-06-22 22:22:32 +00:00
Marcel Moolenaar
ba0e2f9971 Move the duplicated logic of parsing partition types into a new
function called parse_uuid().
2006-06-22 22:05:28 +00:00
Max Laier
0dad3f0e15 Import interface groups from OpenBSD. This allows to group interfaces in
order to - for example - apply firewall rules to a whole group of
interfaces.  This is required for importing pf from OpenBSD 3.9

Obtained from:	OpenBSD (with changes)
Discussed on:	-net (back in April)
2006-06-19 22:20:45 +00:00
Simon L. B. Nielsen
aee85526aa - Fail with an understandable error message if we cannot detect the
sector size, instead of later failing with an error about /boot/mbr
  not being a multiple of the sector size (since we end up with an
  assumed sector size of MAX_SEC_SIZE * 2).
- We query the sector size via an IOCTL anyway, so if that succeeds
  use that instead of probing for it via read(2) calls.  This fixes
  the problem with fdisk failing to operate on at least graid3 and
  md(4) devices on kernels with src/sys/geom/geom_dev.c before
  rev. 1.90, due to fdisk failing to detect the sector size.
- When detecting the root device allow "/" characters in it, which
  happens with e.g. gmirror devices.

Reviewed by:	cperciva
MFC after:	1 week
2006-06-18 22:02:22 +00:00
Oleg Bulyzhin
254c472561 Add support of 'tablearg' feature for:
- 'tag' & 'untag' action parameters.
- 'tagged' & 'limit' rule options.
Rule examples:
	pipe 1 tag tablearg ip from table(1) to any
	allow ip from any to table(2) tagged tablearg
	allow tcp from table(3) to any 25 setup limit src-addr tablearg

sbin/ipfw/ipfw2.c:
1) new macros
   GET_UINT_ARG - support of 'tablearg' keyword, argument range checking.
   PRINT_UINT_ARG - support of 'tablearg' keyword.
2) strtoport(): do not silently truncate/accept invalid port list expressions
   like: '1,2-abc' or '1,2-3-4' or '1,2-3x4'. style(9) cleanup.

Approved by:	glebius (mentor)
MFC after:	1 month
2006-06-15 09:39:22 +00:00
Maxim Konovalov
c11d5762c2 o Revert a previous delta as strlcpy(3) operates with NUL-terminated
strings and cp is not.  Fix logic in the original code and eliminate
core dumps on lines without '\n'.
2006-06-14 15:09:52 +00:00
Maxim Konovalov
fee8a46e77 o Replace (an incorrect) string copy gymnastics with strlcpy(3).
PR:		bin/98905
Submitted by:	Fabian Keil
MFC after:	1 week
2006-06-14 11:45:01 +00:00
Maxim Konovalov
3186023e38 o Fix typo.
Obtained from:	DragonFlyBSD
2006-06-11 15:53:36 +00:00
Tom Rhodes
98d3f2b20b Fix a typo s/Made/Make. Use .Pp for a line break, it will quiet the
mdoc(7) warning.
2006-06-10 09:45:26 +00:00
Juli Mallett
4796c6cc6e Minor style tweaks while nearby. Namely ANSIfy and parens on return values. 2006-06-10 01:44:57 +00:00
Juli Mallett
5256cc2152 Rather than using specified_ro to parse the options list an extra time, and
keeping a flag to check whether we actually wanted to mount the filesystem
readonly, setup the options list so that we start off by assuming rw is what's
desired and let later flags change that.
2006-06-10 01:37:00 +00:00
Konstantin Belousov
5010c3b657 Reparent the process that executes the window= command from the ttys
to the init. This prevents zombies from being accumulated.

PR:		bin/64198
Tested by:	Eugene Grosbein <eugen at www svzserv kemerovo su>
Approved by:	kan (mentor)
MFC after:	1 month
2006-06-08 14:04:36 +00:00
Pawel Jakub Dawidek
c84efdca04 Allow to use the old -a option to specify an encryption algorithm to use
(for backward compatibility), but print a warning to inform about the
change.
2006-06-06 22:06:24 +00:00
Christian Brueffer
6f36bcfc77 Clarify and merge two sentences.
Discussed with:		pjd
2006-06-06 19:03:51 +00:00
Christian Brueffer
b47c8c10c3 Mdoc cleanup and some wording improvements. 2006-06-06 14:02:13 +00:00
Gleb Smirnoff
11c4984f64 Print pfsync interface status if either syncpeer or syncdev is configured. 2006-06-06 11:21:08 +00:00
Pawel Jakub Dawidek
ba0b146814 Remove section committed by mistake. It is not yet ready. 2006-06-06 07:10:42 +00:00
Pawel Jakub Dawidek
198eeec116 Document geli(8) data authentication.
Supported by:	Wheel Sp. z o.o. (http://www.wheel.pl)
2006-06-05 21:43:51 +00:00
Pawel Jakub Dawidek
7fe923a866 Userland bits of geli(8) data authentication.
Now, encryption algorithm is given using '-e' option, not '-a'.
The '-a' option is now used to specify authentication algorithm.

Supported by:	Wheel Sp. z o.o. (http://www.wheel.pl)
2006-06-05 21:40:54 +00:00
Craig Rodrigues
19996233cc Fix "mount -u -o ro".
Requested by:	maxim
2006-06-02 17:53:46 +00:00
Maxim Konovalov
82d9b14e16 o Implement findblk command: find the inode(s) owning the specified
disk block(s) number(s).

Obtained from:	NetBSD
MFC after:	2 months
2006-06-02 12:55:26 +00:00
Max Laier
81bd0dc0bc Print dynamic rules for IPv6 as well.
PR:		bin/98349
Submitted by:	Mark Andrews
MFC after:	2 weeks
2006-06-02 05:17:17 +00:00
Craig Rodrigues
829b898c7c mount_msdosfs.c:
- remove call to getmntopts(), and just pass -o options to
    nmount().  This removes some confusion as to what options
    msdosfs can parse, by pushing the responsibility of option parsing
    to the VFS and FS specific code in the kernel.

msdosfs_vfsops.c:
  - add "force" and "sync" to msdosfs_opts.  They used to be specified
    in mount_msdosfs.c, so move them here.  It's not clear whethere these
    options should be placed into global_opts in vfs_mount.c or not.

Motivated by:	marcus
2006-06-01 02:25:00 +00:00
Matteo Riondato
89d500c6a8 Make recoverdisk compile on amd64 and possibly other 64bit archs.
Bump WARNS to 6.

PR:		amd64/97566
Reviewed by:	phk@
MFC after:	3 days
2006-05-30 19:10:18 +00:00
Oleg Bulyzhin
6a7d5cb645 Implement internal (i.e. inside kernel) packet tagging using mbuf_tags(9).
Since tags are kept while packet resides in kernelspace, it's possible to
use other kernel facilities (like netgraph nodes) for altering those tags.

Submitted by:	Andrey Elsukov <bu7cher at yandex dot ru>
Submitted by:	Vadim Goncharov <vadimnuclight at tpu dot ru>
Approved by:	glebius (mentor)
Idea from:	OpenBSD PF
MFC after:	1 month
2006-05-24 13:09:55 +00:00
Warner Losh
649482853c Remove 'n' from the getopt string. There's no -n option that is
parsed, so it winds up at usage anyway.

Add 'b' to the usage summary.  Noticed by Ben Mesander.
2006-05-23 16:57:47 +00:00
Xin LI
67914dcded do_file() is called recursively from several places and cannot
safely free() anything related to items that may be recursed on.

Obtained from:	DragonFly (rev 1.7, dillon)
PR:		bin/94767
MFC After:	1 month
2006-05-20 05:47:18 +00:00
Craig Rodrigues
067eb35dd0 Remove reference to mount_procfs(8), add reference to procfs(5).
mount(8) doesn't use mount_procfs(8), and instead passes an fstype
of "procfs" directly to nmount().
2006-05-19 00:04:18 +00:00
Ceri Davies
352e01f17b Slight grammar fix. 2006-05-18 15:26:27 +00:00
Craig Rodrigues
c002dbe6a7 Remove reference to mount_ext2fs(8), add reference to ext2fs(5).
mount no longer invokes mount_ext2fs, it calls nmount() directly
with fstype "ext2fs".
2006-05-17 23:29:11 +00:00
Craig Rodrigues
45dcb91f81 Disconnect mount_reiserfs from build.
It is no longer needed, because "mount -t reiserfs" calls nmount(2)
directly to mount a ReiserFS file system without the use of
this external mount program.

Approved by:	dumbbell
2006-05-16 22:12:55 +00:00
Max Laier
926bbf905e For src/dest parsing take off the netmask before checking for AF with
inet_pton.  This fixes cases like "fe02::/16".

PR:		bin/91245
Reported by:	Fredrik Lindberge
2006-05-14 03:53:04 +00:00
Pawel Jakub Dawidek
564084e489 Correct various mistakes in the last commit. 2006-05-13 11:58:58 +00:00
Pawel Jakub Dawidek
4c4090f533 Include other AES key lengths in the comment. 2006-05-13 09:13:58 +00:00
Max Laier
656faadcb8 Remove ip6fw. Since ipfw has full functional IPv6 support now and - in
contrast to ip6fw - is properly lockes, it is time to retire ip6fw.
2006-05-12 20:39:23 +00:00
Max Laier
270404f55a Update manpage for net.inet6.ip6.fw.enable sysctl.
Requested by:	bz
2006-05-12 18:09:33 +00:00
Poul-Henning Kamp
bec1fa8607 Use sysctlbyname 2006-05-11 17:25:36 +00:00
Maxim Konovalov
6e74fb9dff o Extend rev. 1.75 and restore an ability to specify a non-default
quota files location.

Submitted by:	Kostik Belousov
2006-05-10 14:40:40 +00:00
Brooks Davis
fcab8addcf Be more like Windows and Linux and send our hostname in the host-name
option if none is given in the config file.  Also add #ifdefd out
support for sending a client ID based on our MAC address.

PR:		bin/94743, bin/76401
Submitted by:	Frank Behrens <frank at pinky dot sax dot de>
X-MFC after:	6.1-RELEASE
2006-05-07 23:31:10 +00:00