Commit Graph

5329 Commits

Author SHA1 Message Date
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