Commit Graph

178821 Commits

Author SHA1 Message Date
Xin LI
3b9ba32d88 Fix LINT build on amd64. 2013-02-09 04:13:45 +00:00
Adrian Chadd
650da23095 The encryption type field needs to be preserved for each descriptor
making up a frame, in both a sub-frame and for all frames in an
aggregate.

Tested:

* AR5416, STA mode
2013-02-09 02:42:01 +00:00
Navdeep Parhar
bf3db9ebd8 Do not hold locks around hardware context reads.
MFC after:	3 days
2013-02-09 00:35:28 +00:00
Hans Petter Selasky
c3400997c4 Correctly list the usbloader dependencies. 2013-02-08 23:13:46 +00:00
Hans Petter Selasky
056e0b5dcd Make sure we don't leak command buffers when a USB
command transfer fails.

MFC after:	1 week
Reported by:	Ian FREISLICH
2013-02-08 22:51:09 +00:00
Xin LI
08c49d655e In r246282 the KTR_ENTRIES was specified with syntax error, fix it so 'make
universe' would work.

MFC after:	12 days
X-MFC-with:	r246282
2013-02-08 22:41:48 +00:00
Hans Petter Selasky
2d8a425be0 Fix regression issue after r244503:
Correct init order to fix a NULL pointer access.

MFC after:	1 week
Reported by:	Ian FREISLICH
2013-02-08 21:15:47 +00:00
Pedro F. Giffuni
4e1e0e2582 ext2fs: Replace redundant EXT2_MIN_BLOCK with EXT2_MIN_BLOCK_SIZE.
Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-08 21:09:44 +00:00
Pedro F. Giffuni
1a125d6d85 ext2fs: make e2fs_maxcontig local and remove tautological check.
e2fs_maxcontig was modelled after UFS when bringing the
"Orlov allocator" to ext2. On UFS fs_maxcontig is kept in the
superblock and is used by userland tools (fsck and growfs),

In ext2 this information is volatile so it is not available
for userland tools, so in this case it doesn't have sense
to carry it in the in-memory superblock.

Also remove a pointless check for MAX(1, x) > 0.

Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-08 20:58:00 +00:00
Pedro F. Giffuni
a940ce65cd Remove unused MAXSYMLINKLEN macro.
Reviewed by:	mckusick
PR:		kern/175794
MFC after:	1 week
2013-02-08 20:30:19 +00:00
Alfred Perlstein
a99b51055f add semicolon to end of CALLOUT_HANDLE_INITIALIZER example. 2013-02-08 20:13:28 +00:00
Pedro F. Giffuni
23a368256d patch: Follow original versioning convention.
According to the README file [1] the 12u variant, unlike
the 12g variant, contains no copyleft code. It is therefore
convenient to keep using the original versioning scheme to
prevent confusions.

[1] http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/patch/README
2013-02-08 19:39:15 +00:00
Edward Tomasz Napierala
a3bc22a09b Fix NFSv4 permission description in setfacl(1) manual page: the 'D'
means delete_child, not delete.

MFC after:	1 week
2013-02-08 18:43:47 +00:00
Edward Tomasz Napierala
bac44ad218 Improve description of the "-m" option to setfacl(1).
Submitted by:	scottl
MFC after:	1 week
2013-02-08 18:12:16 +00:00
Edward Tomasz Napierala
5293f9bee4 In the setfacl(1) manual page, make it clear that for NFSv4 ACLs,
one should really use -a and -x instead of -m.

MFC after:	1 week
2013-02-08 18:02:28 +00:00
Nathan Whitehorn
746ae9df1f Avoid use of register variables, which some compilers (e.g. clang)
don't like. It makes the code a little clearer as well.

MFC after:	1 week
2013-02-08 17:44:44 +00:00
Konstantin Belousov
00efd852cc The 'end' word was missed in the comment.
MFC after:     3 days
2013-02-08 15:52:20 +00:00
Dag-Erling Smørgrav
30c4fc7cf9 Print a warning if not setuid root.
Document the need for the setuid bit and how to set it.
Explain why it isn't set by default, and suggest simply adding users
to groups instead.

PR:		docs/167741
MFC after:	3 weeks
2013-02-08 14:14:00 +00:00
Dag-Erling Smørgrav
5b2acfeca5 Cross-reference newgrp(1), and document the use of pw(8) to set the group
password.

PR:		docs/167741
MFC after:	3 weeks
2013-02-08 14:11:12 +00:00
Devin Teske
efef5e5c1e Remove NO_OBJ from Makefiles that generate manuals because this causes the
GZIP compressed manuals to appear in ./src instead of the appropriate obj dir.

PR:		conf/175844
Submitted by:	Dominique Goncalves <dominique.goncalves@gmail.com>
2013-02-08 11:14:01 +00:00
Sergey Kandaurov
3c56b4f165 Fix warning: comparison of unsigned expression < 0 is always false.
Reported by:	clang
2013-02-08 09:54:53 +00:00
Adrian Chadd
d6aee93f98 Fix ieee80211_mesh.c compilation.
* Add the superg.h header to allow ieee80211_check_ff() to work
* Since the assert stuff creates assertions based on line numbers and there
  was a conflict, just nudge things down a bit.
2013-02-08 09:11:55 +00:00
Adrian Chadd
d03904f1db Fix a corner case that I noticed with the AR5416 (and it's currently
crappy 802.11n performance, sigh.)

With the AR5416, aggregates need to be limited to 8KiB if RTS/CTS is
enabled.  However, larger aggregates were going out with RTSCTS enabled.
The following was going on:

* The first buffer in the list would have RTS/CTS enabled in
  bf->bf_state.txflags;
* The aggregate would be formed;
* The "copy over the txflags from the first buffer" logic that I added
  blanked the RTS/CTS TX flags fields, and then copied the bf_first
  RTS/CTS flags over;
* .. but that'd cause bf_first to be blanked out! And thus the flag
  was cleared;
* So the rest of the aggregate formation would run with those flags
  cleared, and thus > 8KiB aggregates were formed.

The driver is now (again) correctly limiting aggregate formation for
the AR5416 but there are still other pending issues to resolve.

Tested:

* AR5416, STA mode
2013-02-08 09:07:03 +00:00
Andriy Gapon
0dcab786b8 zfs_vget, zfs_fhtovp: properly handle the z_shares_dir object
A special gfs vnode corresponds to that object.
A regular zfs vnode must not be returned.

This should be upstreamed.

Reported by:	pluknet
Submitted by:	rmacklem
Tested by:	pluknet
MFC after:	10 days
2013-02-08 07:49:54 +00:00
Andriy Gapon
e2bb19dce5 zfs: update comments about zfid_long_t to match the FreeBSD definitions
MFC after:	1 week
2013-02-08 07:44:15 +00:00
Andriy Gapon
c43b08dc6c ktr: correctly handle possible wrap-around in the boot buffer
Older entries should be 'before' newer entries in the new buffer too
and there should be no zero-filled gap between them.

Pointed out by:	jhb
MFC after:	3 days
X-MFC with:	r246282
2013-02-08 07:29:07 +00:00
Jilles Tjoelker
1767d529f2 sh: Simplify mksyntax and make it fit for cross-compiling.
Now it outputs fixed files, which use constants provided by the C standard
library to determine appropriate values for the target machine.

Before, mksyntax inspected the host machine which resulted in subtle
breakage if e.g. char is signed on the host and unsigned on the target such
as when cross-compiling on x86 for ARM.

Tested using -funsigned-char on amd64. Compiling build-tools without it and
sh itself with it causes various tests to fail without this change but not
with this change. With consistent -funsigned-char, tests pass with or
without this change.

The mksyntax program could be removed and syntax.c and syntax.h committed to
the repository.

Submitted by:	Christoph Mallon
MFC after:	2 weeks
2013-02-07 22:42:33 +00:00
Monthadar Al Jaberi
6db8a9b0f4 Mesh: recevied GANN frames where not parsed correctly.
* Added mesh_parse_meshgate_action that parse all values to host endian;
* Add more detailed debug output;

Approved by:	adrian (mentor)
2013-02-07 21:32:09 +00:00
Monthadar Al Jaberi
d68e1a3749 Mesh HWMP forwarding information: updating FI for transmitter.
* Added hwmp_update_transmitter function that checks if the metric
  to the transmitter have improved. If old FI is invalid or metric
  is larger the FI to the transmitter is updated occurdingly.
  This is a recommendation from the 802.11 2012 standard, table 13-9;

Approved by:	adrian (mentor)
2013-02-07 21:31:37 +00:00
Monthadar Al Jaberi
80e25642f2 Mesh HWMP PERR bug fixes.
* When calling ieee80211_mesh_rt_flush_peer, the rt->rt_dest argument
  should not be passed because it can get freed before invalidating
  the other routes that depends on it to compare with next_hop.
  Use PERR_DADDR(i) instead;

Approved by:	adrian (mentor)
2013-02-07 21:30:58 +00:00
Monthadar Al Jaberi
4efafd66eb Mesh bug: debug infomartion showing swapped SA and DA address.
* Fix bug for "forward frame from SA(%6D), DA(%6D)" where addresses where
  swapped between SA and DA;

Approved by:	adrian (mentor)
2013-02-07 21:30:29 +00:00
Monthadar Al Jaberi
62f0748505 Update ddb to print mesh routing table.
* Modified _db_show_vap and _db_show_com to print mesh routing table
  if the 'm' modifier is specified;

Approved by:	adrian (mentor)
2013-02-07 21:29:48 +00:00
Monthadar Al Jaberi
026e280fbf Mesh HWMP PREQ: fixed conditions for discarding elements.
Approved by:	adrian (mentor)
2013-02-07 21:29:14 +00:00
Monthadar Al Jaberi
230394c08b Mesh HWMP: don't send an intermediate PREP for proxy entries.
* The standard is unclear about what should happen in case a mesh STA (not
  marked as a mesh gate) recevies a PREQ for a destination that is marked
  as proxy. Solution for now is not to do intermediate reply at all, and
  let the PREQ reach the mesh gate;

Approved by:	adrian (mentor)
2013-02-07 21:28:25 +00:00
Monthadar Al Jaberi
6e83902004 Mesh HWMP PREQ update: proxy reply only if mesh STA is a meshgate.
* Original PREP frame is transmitted only by the target mesh STA or the
  mesh STA that is the proxy target;
* Fixed so that metric value is not over written incorrectly in
  hwmp_recv_preq for when replying back with a PREP;

Approved by:	adrian (mentor)
2013-02-07 21:27:40 +00:00
Monthadar Al Jaberi
4c4f4aa0f3 HWMP: ic->raw_xmit didn't always point to correct ni.
This is a code re-write. ic->raw_xmit need a pointer to ieee80211_node
for the destination node (da). I have reorganized the code so that
a pointer to the da node is searched for in the end & in one place.

* Make mesh_find_txnode public to be used by HWMP, renamed to
  ieee80211_mesh_finx_txnode;
* changed the argument from ieee80211_node to ieee80211vap for all
  hwmp_send_* functions;
* removed the 'sa' argument from hwmp_send_* functions as all HWMP frames
  have the source address equal to vap->iv_myaddr;
* Modified hwmp_send_action so that if da is MULTCAST ni=vap->iv_bss
  otherwise we called ieee80211_mesh_find_txnode. Also no need to hold
  a reference in this functions if da is not MULTICAST as by finding the
  node it became referenced in ieee80211_find_txnode;

Approved by:	adrian (mentor)
2013-02-07 21:26:40 +00:00
Monthadar Al Jaberi
15254d455e Mesh gate code to transmit to all mesh gates.
* Modified mesh_find_txnode to be able to handle proxy marked entries by
  recursively calling itself to find the txnode towards the active mesh gate;
* Mesh Gate: Added a new function that transmits data frames
  similar to ieee80211_start;
* Modified ieee80211_mesh_forward_to_gates so that:
     + Frames are duplicated and sent to each valid Mesh Gate;
     + Route is marked invalid before return of function, this is
       because we dont know yet which Mesh Gate is we will use;

Approved by:	adrian (mentor)
2013-02-07 21:26:06 +00:00
Monthadar Al Jaberi
b79858dac6 Send frames to mesh gate if 11s discovery fails.
* Send frames that have no path to a known valid Mesh Gate;
* Added the function ieee80211_mesh_forward_to_gates that sends the frame
  to the first found Mesh Gate in the forwarding information;
* If we try to discover again while we are discovering queue frame,
  the discovery callout will send the frames either to mesh gates
  or discards them silently;
* Queue frame also if we try to discover to frequently;

Approved by:	adrian (mentor)
2013-02-07 21:25:32 +00:00
Monthadar Al Jaberi
a21c6123ed Mark root mesh as gate when mesh gate flag set.
* Add function ieee80211_mesh_mark_gate in ieee80211_mesh.h;
* When received a proactive PREQ or RANN with corresponding mesh gate
  flag set, create a new entry in the known mesh gate list;

Approved by:	adrian (mentor)
2013-02-07 21:24:52 +00:00
Monthadar Al Jaberi
4cc361aa03 Propagate GANN frames, and store know gate info.
* Modified mesh_recv_action_meshgate to do following:
    + if mesh STA already knows the mesh gate of the recevied GANN frame
    + if mesh gate is know, check seq number according to 802.11 standard
    + if mesh gate is not know, add it to the list of known mesh gates
    + if forwarding is enabled and ttl >= 1 then propagate the GANN frame;
* Declare a new malloc type M_80211_MESH_GT_RT;
* Declare a struct to store GANN information, ieee80211_mesh_gate_route. And
  add it as a TAILQ list to ieee80211_mesh_state;

Approved by:	adrian (mentor)
2013-02-07 21:24:20 +00:00
Jilles Tjoelker
eb64a9137b sh: Fix a comment. 2013-02-07 21:24:10 +00:00
Monthadar Al Jaberi
ed0b544066 Mesh update: add base Mesh Gate functionality.
A Mesh Gate should transmit a Mesh Action frame containing
ieee80211_meshgann_ie as its only information element periodically
every ieee80211_mesh_gateint ms. Unless the mesh gate is also configure
as a ROOT, then these frames should not be send.
This is according to 802.11 2012 standard;

* Introduce new SYSCTL net.wlan.mesh.gateint, with 10s default;
* Add two new functions mesh_gatemode_setup and mesh_gatemode_cb. This
  is similar to how HWMP setups up a callout;
* Add two new action handlers mesh_recv_action_meshgate and
  mesh_send_action_meshgate;
* Added ieee80211_add_meshgate to ieee80211_mesh.h;
* Modified mesh_send_action to look similar to hwmp_send_action. This is
  because we need to send out broadcast management frames.
* Introduced a new flag for mesh state IEEE80211_MESHFLAGS_ROOT. This flag
  is now set by HWMP code when a mesh STA is configured as a ROOT. This
  is then checked by mesh_gatemode_cb before scheduling a new callout;
* Added to new field to ieee80211_mesh_state:
    + struct callout                  ms_gatetimer
    + ieee80211_mesh_seq              ms_gateseq;

Approved by:	adrian (mentor)
2013-02-07 21:23:43 +00:00
Monthadar Al Jaberi
8904a305ae Mark a mesh path to a mesh gate with a 'G'.
Approved by:	adrian (mentor)
2013-02-07 21:23:03 +00:00
Monthadar Al Jaberi
c81ceff7c7 Start accepting IEEE80211_ACTION_MESH_GANN frames;
* Add IEEE80211_ACTION_MESH_GANN Action frame verification in
  ieee80211_parse_action;

Approved by:	adrian (mentor)
2013-02-07 21:22:14 +00:00
Monthadar Al Jaberi
cd47d75c70 Mesh: management mesh action frames are to be discarded
when not peered.

* Modified ieee80211_recv_action to check if neighbour is peered for
  IEEE80211_ACTION_CAT_MESH frames, if not frame is discarded. This is
  according to IEEE802.11 2012 standard;
* Removed duplicate checks in each hwmp_recv_* handlers because HWMP
  is a subtype of mesh action;

Approved by:	adrian (mentor)
2013-02-07 21:21:40 +00:00
Monthadar Al Jaberi
71766338b2 Update in ieee80211_action.c for mesh code handlers.
* Removed meshlm_send_action and hwmp_send_action. Introduced one common
  for all Mesh Action frames meshaction_send_action. According to 802.11
  standard Link Metric and HWMP are all under Mesh Action category;
* Did similar changes to recv_action part;
* The size of meshaction_*_action is set to 12. This is to make room for
  the rest of Mesh Action category subtypes;

Approved by:	adrian (mentor)
2013-02-07 21:21:05 +00:00
Monthadar Al Jaberi
e1373e86c4 Update net80211 mesh struct ieee80211_meshgann_ie.
* Change all field prefix from pann_ to gann_;
* Added IEEE80211_MESHGANN_BASE_SZ macro to be used in the length field
  of a GANN frame according to 802.11 standard;
* Changed gann_seq field type to uint32_t;
* Added a Gate Announcement interval field according to
  IEEE802.11 2012 standard;
* Added IEEE80211_MESHRT_FLAGS_GATE as flag bit to ieee80211_mesh_route;
* Added IEEE80211_MESHRT_FLAGS_GATE as flag bit to ieee80211req_mesh_route;

Approved by:	adrian (mentor)
2013-02-07 21:20:28 +00:00
Monthadar Al Jaberi
40c44a6bb5 HWMP: Accept a PERR even if path is valid.
* An HWMP PERR should be accepted even if path is valid. Because
  we check if we recevied it from a neighbour that we use as a next hop;

Approved by:	adrian (mentor)
2013-02-07 21:19:44 +00:00
Monthadar Al Jaberi
227da7d10b Add mesh debug for interarction between DS & MBSS.
* Add mesh debug information when frames enter or leave the MBSS;
* Set IEEE80211_MSG_OUTPUT bit to enable output;

Approved by:	adrian (mentor)
2013-02-07 21:18:22 +00:00
Monthadar Al Jaberi
8c751dd528 Fix mesh path flag.
* A bug occurs while in discovery mode which leaves a path marked with
  both Discover and Valid flag. This happens when receiving/sending
  PREQ and PREP in a particular order. Solution is to assign the Valid bit
  instead of oring it;

Approved by:	adrian (mentor)
2013-02-07 21:17:35 +00:00