diff options
author | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:35:10 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:35:10 +0000 |
commit | 3b1abc639022bf902ec77bd4657fd906ef5264c0 (patch) | |
tree | 6f6e59012468c87510911a8571b7cbdd0e8be132 /sys/net80211/ieee80211_input.c | |
parent | 6177587c4108e56c6ce847cc3d8493713a845ff6 (diff) | |
download | FreeBSD-src-3b1abc639022bf902ec77bd4657fd906ef5264c0.zip FreeBSD-src-3b1abc639022bf902ec77bd4657fd906ef5264c0.tar.gz |
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
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 b4c4e75..76b3bed 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; |