From: Thomas Pedersen <thomas@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: javier@cozybit.com, johannes@sipsolutions.net, linville@tuxdriver.com
Subject: [PATCH v6 02/10] nl80211: Add userspace authentication flag to mesh setup
Date: Fri, 1 Apr 2011 13:35:43 -0700 [thread overview]
Message-ID: <1301690151-14979-3-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1301690151-14979-1-git-send-email-thomas@cozybit.com>
From: Javier Cardona <javier@cozybit.com>
During mesh setup, use NL80211_MESH_SETUP_USERSPACE_AUTH flag to create
a secure mesh and route management frames to userspace.
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
include/linux/nl80211.h | 4 ++++
include/net/cfg80211.h | 2 ++
net/mac80211/cfg.c | 1 +
net/mac80211/ieee80211_i.h | 1 +
net/wireless/nl80211.c | 2 ++
5 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 82ef17d..91e3a8d 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1691,6 +1691,9 @@ enum nl80211_meshconf_params {
* robust security network ie, or a vendor specific information element that
* vendors will use to identify the path selection methods and metrics in use.
*
+ * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
+ * daemon will be authenticating mesh candidates.
+ *
* @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
* @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
*/
@@ -1699,6 +1702,7 @@ enum nl80211_mesh_setup_params {
NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL,
NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC,
NL80211_MESH_SETUP_IE,
+ NL80211_MESH_SETUP_USERSPACE_AUTH,
/* keep last */
__NL80211_MESH_SETUP_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1714943..2334985 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -656,6 +656,7 @@ struct mesh_config {
* @path_metric: which metric to use
* @ie: vendor information elements (optional)
* @ie_len: length of vendor information elements
+ * @is_secure: or not
*
* These parameters are fixed when the mesh is created.
*/
@@ -666,6 +667,7 @@ struct mesh_setup {
u8 path_metric;
const u8 *ie;
u8 ie_len;
+ bool is_secure;
};
/**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f2f345a..4f73085 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1042,6 +1042,7 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh,
memcpy(ifmsh->mesh_id, setup->mesh_id, ifmsh->mesh_id_len);
ifmsh->mesh_pp_id = setup->path_sel_proto;
ifmsh->mesh_pm_id = setup->path_metric;
+ ifmsh->is_secure = setup->is_secure;
return 0;
}
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index d0fafde..7d1cb36 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -490,6 +490,7 @@ struct ieee80211_if_mesh {
bool accepting_plinks;
const u8 *ie;
u8 ie_len;
+ bool is_secure;
};
#ifdef CONFIG_MAC80211_MESH
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f251089..5878f2b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2804,6 +2804,7 @@ static const struct nla_policy
nl80211_mesh_setup_params_policy[NL80211_MESH_SETUP_ATTR_MAX+1] = {
[NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL] = { .type = NLA_U8 },
[NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC] = { .type = NLA_U8 },
+ [NL80211_MESH_SETUP_USERSPACE_AUTH] = { .type = NLA_FLAG },
[NL80211_MESH_SETUP_IE] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
};
@@ -2915,6 +2916,7 @@ static int nl80211_parse_mesh_setup(struct genl_info *info,
setup->ie = nla_data(ieattr);
setup->ie_len = nla_len(ieattr);
}
+ setup->is_secure = nla_get_flag(tb[NL80211_MESH_SETUP_USERSPACE_AUTH]);
return 0;
}
--
1.7.4.1
next prev parent reply other threads:[~2011-04-01 21:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 20:35 [PATCH v6 00/10] {mac|nl}80211: mesh security enhancements Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 01/10] nl80211: rename NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE Thomas Pedersen
2011-04-01 20:35 ` Thomas Pedersen [this message]
2011-04-01 20:35 ` [PATCH v6 03/10] mac80211: ignore peers if security is enabled for this mesh Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 04/10] nl80211: let userspace authenticate stations Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 05/10] mac80211: Let user space receive and send mesh auth/deauth frames Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 06/10] mac80211: ignore peer link requests from unauthenticated stations Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 07/10] mac80211: Perform PLINK_ACTION on new station Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 08/10] nl80211: New notification to discover mesh peer candidates Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 09/10] mac80211: send notification on new peer candidate for our secure mesh Thomas Pedersen
2011-04-01 20:35 ` [PATCH v6 10/10] nl80211: report mesh capabilities Thomas Pedersen
2011-04-04 12:20 ` Johannes Berg
2011-04-04 12:21 ` [PATCH v6 00/10] {mac|nl}80211: mesh security enhancements Johannes Berg
2011-04-04 20:38 ` Thomas Pedersen
2011-04-04 20:44 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301690151-14979-3-git-send-email-thomas@cozybit.com \
--to=thomas@cozybit.com \
--cc=javier@cozybit.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).