MFC r231895:

Remove two clang warnings.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232724:
Add support for stf interfaces.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233240 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232866:

This fixes PR 165210. Basically we just
add in the netgraph interface to the list of
acceptable interfaces. A todo at the next
IETF code blitz, though is we need to review
why we screen interfaces, there was a reason ;-).
From rrs@.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233004:

Fix bugs which can result in a panic when an non-SCTP socket it
used with an sctp_ system-call which expects an SCTP socket.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233005:

Clean up, no functional change.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge 226690 and 226725 from head:
  Protect NIS client with madvise(2) since this daemon is required
  for succesful authentication of users.

  Protect NIS server with madvise(2) since this daemon is required
  for succesful authentication of users.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge 227308 from head/:
  In icmp6_redirect_input:

  - Assert that we got a valid mbuf with rcvif pointer. [1]
  - Use __func__ in logging.

  Submitted by: prabhakar lakhera <prabhakar.lakhera gmail.com> [1]
  Submitted by: Kristof Provost <kristof sigsegv.be> [1]


git-svn-id: svn://svn.freebsd.org/base/stable/9@233261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge from head:
r227785:
  - Reduce severity for all ARP events, that can be triggered from remote
    machine to LOG_NOTICE. Exception left to "using my IP address".
  - Fix multicast ARP warning: add newline and also log the bad MAC address.

  Tested by:    Alexander Wittig <wittigal msu.edu>

r227790:
  Be more informative for "unknown hardware address format" message.

  Submitted by: Andrzej Tobola <ato iem.pw.edu.pl>


git-svn-id: svn://svn.freebsd.org/base/stable/9@233265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge 228321 from head:
  Fix double free.

  PR:           kern/163089
  Submitted by: Herbie Robinson <Herbie.Robinson stratus.com>


git-svn-id: svn://svn.freebsd.org/base/stable/9@233266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge 232685 from head:
  Merge from OpenBSD:

    revision 1.146
    date: 2010/05/12 08:11:11;  author: claudio;  state: Exp;  lines: +2 -3
    bzero() the full compressed update struct before setting the values.
    This is needed because pf_state_peer_hton() skips some fields in certain
    situations which could result in garbage beeing sent to the other peer.
    This seems to fix the pfsync storms seen by stephan@ and so dlg owes me
    a whiskey.

  I didn't see any storms, but this definitely fixes a useless memory
  allocation on the receiving side, due to non zero scrub_flags field
  in a pfsync_state_peer structure.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r232975: Add an assert for proctree_lock to proc_to_reap().


git-svn-id: svn://svn.freebsd.org/base/stable/9@233281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 230394,230441,230489,230552,232420:
Close a race in NFS lookup processing that could result in stale name cache
entries on one client when a directory was renamed on another client.  The
root cause for the stale entry being trusted is that each per-vnode nfsnode
structure has a single 'n_ctime' timestamp used to validate positive name
cache entries.  However, if there are multiple entries for a single vnode,
they all share a single timestamp.  To fix this, extend the name cache
to allow filesystems to optionally store a timestamp value in each name
cache entry.  The NFS clients now fetch the timestamp associated with
each name cache entry and use that to validate cache hits instead of the
timestamps previously stored in the nfsnode.  Another part of the fix is
that the NFS clients now use timestamps from the post-op attributes of
RPCs when adding name cache entries rather than pulling the timestamps out
of the file's attribute cache.  The latter is subject to races with other
lookups updating the attribute cache concurrently.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r229201: sh: Make patmatch() non-recursive.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233010:
 Remove TARGET_ARCH conditionals for COMPAT_FREEBSD32.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233193:

Add explicit braces to avoid dangling else in stl_tree.h.  This silences
the following warning produced by clang trunk:

  In file included from /usr/src/sbin/devd/devd.cc:91:
  In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
  /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
        else
        ^


git-svn-id: svn://svn.freebsd.org/base/stable/9@233297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233195:

Fix the following warning from clang trunk:

usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
	snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset);
								     ~~^            ~~~~~~~~~
								     %llx

Silence this by casting dc->reset to intmax_t, and using the appropriate
length modifier.  While here, wrap the line to a 80 character margin.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r233037 and r233039:
Fix cross-platform issue about the file-format in which
usbdump stores data.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC:	232703

Add support for ns timestamps and birthtime to the ext2/3 driver.

When using big inodes there is sufficient space in ext3 to
keep extra resolution and birthtime (creation) timestamps.
We now support the extra timestamps silently when the inode
is big enough.

Reviewed by:	bde
Approved by:	jhb (mentor)


git-svn-id: svn://svn.freebsd.org/base/stable/9@233322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 232116:
Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
post-op attributes for ENOENT errors now that the name caching logic
depends on working post-op attributes.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 230547:
Add a timeout on positive name cache entries in the NFS client.  That is,
we will only trust a positive name cache entry for a specified amount of
time before falling back to a LOOKUP RPC, even if the ctime for the file
handle matches the cached copy in the name cache entry.  The timeout is
configured via a new 'nametimeo' mount option and defaults to 60 seconds.
It may be set to zero to disable positive name caching entirely.


git-svn-id: svn://svn.freebsd.org/base/stable/9@233326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f