7569 Commits

Author SHA1 Message Date
ae
76b23ad923 MFC r285735:
lseek() allows an offset to be set beyond the end of file. Using
  it to check that partition has enough space to write bootcode doesn't
  work. Use the known size of provider instead.

  PR:		201504
2015-07-28 08:22:50 +00:00
jimharris
c7ba7d86bd MFC r285796:
nvmecontrol: read controller identify data before any log page operations

Sponsored by:	Intel
2015-07-27 15:34:02 +00:00
hrs
b037e0b55c MFC r282805:
- Remove ND6_IFF_IGNORELOOP.  This functionality was useless in practice
  because a link where looped back NS messages are permanently observed
  does not work with either NDP or ARP for IPv4.

- draft-ietf-6man-enhanced-dad is now RFC 7527.

Approved by:	re (gjb)
2015-07-23 19:58:56 +00:00
hrs
c20172e5e8 MFC r271910, r273211:
* Add -x waittime and -X timeout options for feature parity.  These are
  equivalent to -W and -t options of ping(8).  Different letters are used
  because both have already been used for another purposes in ping6(8).

* Fix a problem that reply packets are not received when -i T option is set
  and (T < RTT).

 - Use select(2) for timeout instead of interval timer. Remove poll(2) support.
 - Use sigaction(2) instead of signal(3).
 - Exit in SIGINT handler when two signals are received and doing reverse DNS
   lookup as ping(8) does.
 - Remove redundant variables used for getaddrinfo(3).

Approved by:	re (gjb)
2015-07-23 19:52:03 +00:00
allanjude
10c80a84da MFC: r285594
New partition flag for gpart, writes the 0xee partition in the pmbr in the second slot, rather than the first.
	Works around Lenovo legacy GPT boot issue

PR:		184910
Approved by:	re (gjb), marcel
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3140
2015-07-21 15:50:14 +00:00
brueffer
dbae220f09 MFC: r285529
If ggated's exports_find() fails, the connection is removed before
(trying to) report the problem to the client.

sendfail() is called with an already closed socket and thus it
fails to inform the client about the problem.

Fix this by calling sendfail() before connection_remove().

PR:		195944
Submitted by:	Fabian Keil
Reviewed by:	pjd
Approved by:	re (gjb)
2015-07-21 14:27:36 +00:00
brueffer
77896922f6 MFC: r285531
Unbreak ggatec and ggatel on i386 after r238119, which added two more
'struct g_gate_ctl_create' fields.

While the behaviour was technically undefined on other architectures
as well, on the reporter's amd64 systems the uninitialized bytes the
kernel cares about were always zero so everything worked as expected.

PR:		197309, 199559
Submitted by:	ota@j.email.ne.jp, Fabian Keil
Reviewed by:	pjd
Approved by:	re (gjb)
2015-07-21 14:25:21 +00:00
brueffer
fd9aec951b MFC: r285037
Add -b to the devlist usage info, forgotten in r260059.

PR:		195094
Submitted by:	robin.hahling@gw-computing.net
Approved by:	re (marius)
2015-07-14 11:37:26 +00:00
brueffer
3b154288ec MFC: r284290, r284323
Improve grammar.

PR:		200673
Submitted by:	Fabian Keil
Obtained from:	ElectroBSD
Approved by:	re (gjb)
2015-07-13 13:14:51 +00:00
brueffer
69a48b293b MFC: r285029
Fix an obviously wrong boolean operator.

PR:		200983
Submitted by:	David Bindeman
Approved by:	re (gjb)
2015-07-13 13:02:04 +00:00
brueffer
22520d35de MFH: r284250
Consistently use trailing whitespace in passphrase prompts.

PR:		193496
Submitted by:	Fabian Keil
2015-06-24 12:21:25 +00:00
trasz
5c12b82b8d MFC r281929:
Fix growfs(8) build with debug enabled (make -DGFSDBG).

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:49:44 +00:00
trasz
a79dffff33 MFC r282857:
Document RCTL events in devd.conf(5).

Sponsored by:	The FreeBSD Foundation
2015-06-21 06:36:54 +00:00
rmacklem
80271ba17a MFC: r284531
Document that a forced dismount of an NFSv3 mount when the
NLM (rpc.lockd) is running can crash the system.
Unfortunately this is not easy to fix, but I have left
PR#200585 open.
2015-06-20 23:15:57 +00:00
ken
1d2632e58b MFC, r284192:
------------------------------------------------------------------------
  r284192 | ken | 2015-06-09 15:39:38 -0600 (Tue, 09 Jun 2015) | 102 lines

  Add support for reading MAM attributes to camcontrol(8) and libcam(3).

  MAM is Medium Auxiliary Memory and is most commonly found as flash
  chips on tapes.

  This includes support for reading attributes and decoding most
  known attributes, but does not yet include support for writing
  attributes or reporting attributes in XML format.

  libsbuf/Makefile:
  	Add subr_prf.c for the new sbuf_hexdump() function.  This
  	function is essentially the same function.

  libsbuf/Symbol.map:
  	Add a new shared library minor version, and include the
  	sbuf_hexdump() function.

  libsbuf/Version.def:
  	Add version 1.4 of the libsbuf library.

  libutil/hexdump.3:
  	Document sbuf_hexdump() alongside hexdump(3), since it is
  	essentially the same function.

  camcontrol/Makefile:
  	Add attrib.c.

  camcontrol/attrib.c:
  	Implementation of READ ATTRIBUTE support for camcontrol(8).

  camcontrol/camcontrol.8:
  	Document the new 'camcontrol attrib' subcommand.

  camcontrol/camcontrol.c:
  	Add the new 'camcontrol attrib' subcommand.

  camcontrol/camcontrol.h:
  	Add a function prototype for scsiattrib().

  share/man/man9/sbuf.9:
  	Document the existence of sbuf_hexdump() and point users to
  	the hexdump(3) man page for more details.

  sys/cam/scsi/scsi_all.c:
  	Add a table of known attributes, text descriptions and
  	handler functions.

  	Add a new scsi_attrib_sbuf() function along with a number
  	of other related functions that help decode attributes.

  	scsi_attrib_ascii_sbuf() decodes ASCII format attributes.

  	scsi_attrib_int_sbuf() decodes binary format attributes, and
  	will pass them off to scsi_attrib_hexdump_sbuf() if they're
  	bigger than 8 bytes.

  	scsi_attrib_vendser_sbuf() decodes the vendor and drive
  	serial number attribute.

  	scsi_attrib_volcoh_sbuf() decodes the Volume Coherency
  	Information attribute that LTFS writes out.

  sys/cam/scsi/scsi_all.h:
  	Add a number of attribute-related structure definitions and
  	other defines.

  	Add function prototypes for all of the functions added in
  	scsi_all.c.

  sys/kern/subr_prf.c:
  	Add a new function, sbuf_hexdump().  This is the same as
  	the existing hexdump(9) function, except that it puts the
  	result in an sbuf.

  	This also changes subr_prf.c so that it can be compiled in
  	userland for includsion in libsbuf.

  	We should work to change this so that the kernel hexdump
  	implementation is a wrapper around sbuf_hexdump() with a
  	statically allocated sbuf with a drain.  That will require
  	a drain function that goes to the kernel printf() buffer
  	that can take a non-NUL terminated string as input.
  	That is because an sbuf isn't NUL-terminated until it is
  	finished, and we don't want to finish it while we're still
  	using it.

  	We should also work to consolidate the userland hexdump and
  	kernel hexdump implemenatations, which are currently
  	separate.  This would also mean making applications that
  	currently link in libutil link in libsbuf.

  sys/sys/sbuf.h:
  	Add the prototype for sbuf_hexdump(), and add another copy
  	of the hexdump flag values if they aren't already defined.

  	Ideally the flags should be defined in one place but the
  	implemenation makes it difficult to do properly.  (See
  	above.)

  Sponsored by:	Spectra Logic Corporation

------------------------------------------------------------------------
2015-06-16 02:31:11 +00:00
bryanv
dfb124acf0 MFC r273331, r273371, r275851:
- Add vxlan interface

 - Use the size of the Ethernet address, not the entire header, when
   copying into forwarding entry.

 - Prefix all the vxlan ifconfig commands so they are unique
2015-06-14 03:14:45 +00:00
bryanv
9299c65128 MFC r271603:
Add DEF_CLONE_CMD_ARG2
2015-06-13 19:36:32 +00:00
ae
49fd76c05c MFC r282809:
Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated
  packets on tunnel interfaces. Add support of these ioctls to gre(4),
  gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use
  if_fib value from ifnet structure, use proper value in gre(4) and me(4).

  Differential Revision:	https://reviews.freebsd.org/D2462
2015-06-06 13:37:11 +00:00
ae
920800a21f MFC r274246:
Overhaul if_gre(4).

  Split it into two modules: if_gre(4) for GRE encapsulation and
  if_me(4) for minimal encapsulation within IP.

  gre(4) changes:
  * convert to if_transmit;
  * rework locking: protect access to softc with rmlock,
    protect from concurrent ioctls with sx lock;
  * correct interface accounting for outgoing datagramms (count only payload size);
  * implement generic support for using IPv6 as delivery header;
  * make implementation conform to the RFC 2784 and partially to RFC 2890;
  * add support for GRE checksums - calculate for outgoing datagramms and check
    for inconming datagramms;
  * add support for sending sequence number in GRE header;
  * remove support of cached routes. This fixes problem, when gre(4) doesn't
    work at system startup. But this also removes support for having tunnels with
    the same addresses for inner and outer header.
  * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD.
    Use our standard ioctls for tunnels.

  me(4):
  * implementation conform to RFC 2004;
  * use if_transmit;
  * use the same locking model as gre(4);

  PR:		164475

MFC r274289 (by bz):
  gcc requires variables to be initialised in two places.  One of them
  is correctly  used only under the same conditional though.

  For module builds properly check if the kernel supports INET or INET6,
  as otherwise various mips kernels without IPv6 support would fail to build.

MFC r274964:
  Add ip_gre.h to ObsoleteFiles.inc.
2015-06-06 12:44:42 +00:00
pkelsey
b8022a7806 MFC r283641:
Add CAP_FCNTL to the lease file capsicum rights, and limit to
CAP_FCNTL_GETFL.  Without CAP_FCNTL_GETFL, the lease file truncation
in rewrite_client_leases() will fail to trim old data when rewriting
the file with a lesser amount of data.
2015-06-04 04:54:54 +00:00
pjd
fb6b5e38d8 MFC r265950 (by thomas):
Add mention of metadata version 7 in FreeBSD 10.0.
2015-06-02 20:29:58 +00:00
ae
8fe024e563 MFC r283577:
Print leading zeroes of UFS2 fs_id like we do for UFS1.

PR:		156908
2015-06-02 01:55:54 +00:00
ae
8272d42d32 MFC r282965:
Add an ability accept encapsulated packets from different sources by one
  gif(4) interface. Add new option "ignore_source" for gif(4) interface.
  When it is enabled, gif's encapcheck function requires match only for
  packet's destination address.

  Differential Revision:	https://reviews.freebsd.org/D2004
  Sponsored by:	Yandex LLC
2015-05-31 22:58:41 +00:00
erj
d390788aa7 MFC r281236 -- extended media types in if_media.h.
Approved by:	jfv (mentor)
2015-05-29 23:02:12 +00:00
ngie
31908b1bd5 MFC r282747:
Use MIN from sys/param.h instead of handrolling the macro

Replace sys/types.h with sys/param.h per-style(9)

Sponsored by: EMC / Isilon Storage Division
2015-05-16 22:36:19 +00:00
trasz
871ace6a13 MFC r279489:
Make the "automounted" flag work for FUSE filesystems.

PR:		192852
Submitted by:	taku at tackymt.homeip.net (earlier version)
Sponsored by:	The FreeBSD Foundation
2015-05-15 11:00:12 +00:00
trasz
7fcf215ed5 MFC r277170:
Add devd(8) notifications for creation and destruction of GEOM devices.

Sponsored by:	The FreeBSD Foundation
2015-05-15 10:42:48 +00:00
ae
8e1b135fb3 MFC r282465:
Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.
  Sort DOSPTYP_* entries in diskmbr.h by value.
  Document these scheme-specific types in gpart(8).
2015-05-13 14:05:53 +00:00
gjb
5e2ef62eee MFC r282434:
MFV r225523, r282431:
   r225523 (hrs):
    Import openresolv-3.4.4.

   r282431:
    Import openresolv-3.7.0.

PR:		199854
Submitted by:	yuri@rawbw.com
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-11 01:33:34 +00:00
hiren
e545513c3e MFC r261708, r261847, r268525, r274316, r274347, r275593,
r276844, r276847, r279531, r279559, r279564, r279676

A bunch of IPv6 fixes by melifaro, hrs and ae

Major changes:
Simplify nd6_output_lle()
Add refcounting to DAD and fix races and other errors
Implement Enhanced DAD algorithm for IPv6

Suggested by: 	ae
Tested by: 	Jason Wolfe <j at nitrology.com>
Sponsored by:	Limelight Networks
2015-05-08 08:35:06 +00:00
jgh
11393ed285 MFC: r281324
- ggatel.8 currently doesn't mention the 'rescue' command and
  documents a non-existing 'attach' command instead.
- while here address a spelling error

Approved by:	wblock (mentor)
Differential Revision:	https://reviews.freebsd.org/D2346
2015-04-22 18:54:51 +00:00
allanjude
68d15d29f8 MFC: r280191:
Document that nextboot(8) doesn't work as expected with ZFS

Approved by:	eadler (mentor, implicit)
Sponsored by:	ScaleEngine Inc.
2015-04-16 00:39:16 +00:00
allanjude
642a35345c MFC: r266774:
improve ifconfig(8) man page by describing special behaviour of -l ether

MFC: r267141:
	Style cleanups on ifconfig.8

Approved by:	eadler (mentor, implicit)
Sponsored by:	ScaleEngine Inc.
2015-04-16 00:31:51 +00:00
pfg
af53064a71 MFC r281320:
Update documented OEM string in newfs_msdos(8).

This was updated in r203868 to better match the naming scheme
in other OSs that use FAT.
2015-04-14 18:45:30 +00:00
delphij
edfb896790 MFC r280716,280767,280914:
- Correct type for checkAgainst.
 - Staticify flags that are not used outside the file scope.
 - Fix warnings.
 - Constify parameters.
2015-04-14 00:32:03 +00:00
delphij
0f18b563c9 MFC r266417 (bjk):
Assorted updates to md5.1

Note that the -c argument's parameter is compared against the digest of
the file, not the file. [1]

Update the "current time" parentheticals for notes about reversing
and colliding the hash functions. [1]

Some general mdoc updates.

PR:		docs/188043 [1]
Submitted by:	Jamie Landeg-Jones [1]
2015-04-14 00:27:54 +00:00
jhb
0fbe5b3df8 MFC 279951:
Simplify string mangling in ifmaybeload().
- Use strlcpy() instead of strcpy().
- Use strlcat() instead of a strlcpy() with a magic number subtracted
  from the length.
- Replace strncmp(..., strlen(foo) + 1) with strcmp(...).
2015-04-09 21:06:51 +00:00
mav
5f22f76484 MFC r280687: Make GEOM_PART work in presence of previous withered self. 2015-04-09 10:10:05 +00:00
wblock
0aa481cad3 MFC 280988:
Add articles, avoid use of "you", simplify a few sentences.
2015-04-09 03:30:05 +00:00
mav
7e7a1cb5ec MFC r280166:
Make ATA power management commands to work on SCSI HBAs via PASS THROUGH.
2015-03-31 07:21:53 +00:00
mav
457dafa988 MFC r280249: Add camcontrol subcommands to control APM and AAM levels.
Sponsored by:	iXsystems, Inc.
2015-03-26 08:38:53 +00:00
ae
c07681e98f MFC r269854:
Remove duplicate entry.

MFC r279935:
  Add GUID and alias for Apple Core Storage partition.

  PR:		196241
2015-03-19 14:09:27 +00:00
rwatson
bcbbcda0f2 Merge an applicable subset of r263234 from HEAD to stable/10:
Update most userspace consumers of capability.h to use capsicum.h instead.

  auditdistd is not updated as I will make the change upstream and then do a
  vendor import sometime in the next week or two.

Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc.  When these features
are merged, the capsicum.h change will need to be merged with them.

Sponsored by:	Google, Inc.
2015-03-19 12:32:48 +00:00
trasz
1aec35d876 MFC r277799:
Fix sysctl name.

Sponsored by:	The FreeBSD Foundation
2015-03-07 19:46:47 +00:00
ae
204f9a5f7c MFC r279324:
When gpart(8) is trying automatically determine the first available
  block of free space after existing partition, take into account
  provider's stripeoffset, since the result will be adjusted to this
  value.

  PR:		197989
2015-03-05 10:08:37 +00:00
ken
a5cd9b061e MFC r278964:
The __FreeBSD_version was changed to 1001510 to be appropriate for
stable/10.

I will followup with a commit to mpr(4) and mps(4) in head to reflect
the stable/10 __FreeBSD_version and merge the change back to stable/10.

  ------------------------------------------------------------------------
  r278964 | ken | 2015-02-18 11:30:19 -0700 (Wed, 18 Feb 2015) | 46 lines

  Make sure that the flags for the XPT_DEV_ADVINFO CCB are initialized
  properly.

  If there is garbage in the flags field, it can sometimes include a
  set CDAI_FLAG_STORE flag, which may cause either an error or
  perhaps result in overwriting the field that was intended to be
  read.

  sys/cam/cam_ccb.h:
  	Add a new flag to the XPT_DEV_ADVINFO CCB, CDAI_FLAG_NONE,
  	that callers can use to set the flags field when no store
  	is desired.

  sys/cam/scsi/scsi_enc_ses.c:
  	In ses_setphyspath_callback(), explicitly set the
  	XPT_DEV_ADVINFO flags to CDAI_FLAG_NONE when fetching the
  	physical path information.  Instead of ORing in the
  	CDAI_FLAG_STORE flag when storing the physical path, set
  	the flags field to CDAI_FLAG_STORE.

  sys/cam/scsi/scsi_sa.c:
  	Set the XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE when
  	fetching extended inquiry information.

  sys/cam/scsi/scsi_da.c:
  	When storing extended READ CAPACITY information, set the
  	XPT_DEV_ADVINFO flags field to CDAI_FLAG_STORE instead of
  	ORing it into a field that isn't initialized.

  sys/dev/mpr/mpr_sas.c,
  sys/dev/mps/mps_sas.c:
  	When fetching extended READ CAPACITY information, set the
  	XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE instead of
  	setting it to 0.

  sbin/camcontrol/camcontrol.c:
  	When fetching a device ID, set the XPT_DEV_ADVINFO flags
  	field to CDAI_FLAG_NONE instead of 0.

  sys/sys/param.h:
  	Bump __FreeBSD_version to 1100061 for the new XPT_DEV_ADVINFO
  	CCB flag, CDAI_FLAG_NONE.

  Sponsored by:	Spectra Logic
2015-02-26 20:46:16 +00:00
ngie
63d67d50be MFC r277678:
r277678:

  Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc

  Sponsored by: EMC / Isilon Storage Division
2015-02-13 21:32:05 +00:00
ngie
e146e39f9f MFC r277725:
r277725:

  Add MK_HAST knob for building and installing hastd(8), et al

  Sponsored by: EMC / Isilon Storage Division
2015-02-11 07:12:00 +00:00
ngie
bf4551aa32 MFC r277675,r277726,r278070:
r277675:

  Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
  modules, etc

  Sponsored by: EMC / Isilon Storage Division

r277726:

  Build sbin/iscontrol again if MK_ISCSI != no

  Pointyhat to: me

r278070:

  Remove duplicate MK_ISCSI block and sort the conditional blocks so this error
  won't crop up again in the future

  Reported by: gjb
2015-02-11 07:08:32 +00:00
jhb
1fa38dee26 MFC 277714:
natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address.  This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.
2015-02-06 18:13:29 +00:00