diff options
author | Monthadar Al Jaberi <monthadar@FreeBSD.org> | 2012-05-01 15:35:10 +0000 |
---|---|---|
committer | Monthadar Al Jaberi <monthadar@FreeBSD.org> | 2012-05-01 15:35:10 +0000 |
commit | ebeaa1ade54132ec6aabac6a8351b91c0a1b4687 (patch) | |
tree | 6f6e59012468c87510911a8571b7cbdd0e8be132 /sys/net80211/ieee80211_input.c | |
parent | 352f07f66d1f3966967260b955c06df0af022b76 (diff) | |
download | src-ebeaa1ade54132ec6aabac6a8351b91c0a1b4687.tar.gz src-ebeaa1ade54132ec6aabac6a8351b91c0a1b4687.zip |
Added Self-protected action category (including MPM).
* Added new action category IEEE80211_ACTION_CAT_SELF_PROT which is used by 11s
for Mesh Peering Management;
* Updated Self protected enum Action codes to start from 1 instead of 0
according to the standard spec;
* Removed old and wrong action categories IEEE80211_ACTION_CAT_MESHPEERING;
* Modified ieee80211_mesh.c and ieee80211_action.c to use the new action
category code;
* Added earlier verification code in ieee80211_input;
Approved by: adrian
Notes
Notes:
svn path=/head/; revision=234874
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index b4c4e75a0fad..76b3bedf12b1 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -792,6 +792,24 @@ ieee80211_parse_action(struct ieee80211_node *ni, struct mbuf *m) return EINVAL; } break; + case IEEE80211_ACTION_CAT_SELF_PROT: + /* If TA or RA group address discard silently */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1) || + IEEE80211_IS_MULTICAST(wh->i_addr2)) + return EINVAL; + /* + * XXX: Should we verify complete length now or it is + * to varying in sizes? + */ + switch (ia->ia_action) { + case IEEE80211_ACTION_MESHPEERING_CONFIRM: + case IEEE80211_ACTION_MESHPEERING_CLOSE: + /* is not a peering candidate (yet) */ + if (ni == vap->iv_bss) + return EINVAL; + break; + } + break; #endif } return 0; |