svn commit: r195050 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Fri Jun 26 11:55:45 UTC 2009
Author: rpaulo
Date: Fri Jun 26 11:55:44 2009
New Revision: 195050
URL: http://svn.freebsd.org/changeset/base/195050
Log:
Fix previous revs to DTRT.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sys/net80211/ieee80211_mesh.c
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.c Fri Jun 26 11:45:06 2009 (r195049)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Fri Jun 26 11:55:44 2009 (r195050)
@@ -761,8 +761,8 @@ mesh_recv_mgmt(struct ieee80211_node *ni
if (meshid != NULL)
IEEE80211_VERIFY_ELEMENT(meshid,
IEEE80211_MESHID_LEN, return);
- IEEE80211_VERIFY_SSID(vap->iv_bss, ssid, return);
- /* XXX add verify meshid ? */
+ /* NB: meshid, not ssid */
+ IEEE80211_VERIFY_SSID(vap->iv_bss, meshid, return);
/* XXX find a better class or define it's own */
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2,
@@ -816,6 +816,7 @@ mesh_recv_action(struct ieee80211_node *
struct ieee80211_meshid_ie *meshid = NULL;
struct ieee80211_meshconf_ie *meshconf = NULL;
struct ieee80211_meshpeer_ie *meshpeer = NULL;
+ struct ieee80211_meshpeer_ie meshpeercopy;
uint8_t *frm, *efrm;
union ieee80211_send_action_args vargs;
@@ -877,8 +878,13 @@ mesh_recv_action(struct ieee80211_node *
if (meshpeer->peer_subtype ==
IEEE80211_MESH_PEER_LINK_CLOSE &&
meshpeer->peer_len == 5) {
- meshpeer->peer_rcode =
+ memcpy(&meshpeercopy, meshpeer,
+ sizeof(*meshpeer) -
+ sizeof(uint16_t));
+ meshpeercopy.peer_rcode =
LE_READ_2(&meshpeer->peer_linkid);
+ meshpeercopy.peer_linkid = 0;
+ meshpeer = &meshpeercopy;
} else {
meshpeer->peer_linkid =
LE_READ_2(&meshpeer->peer_linkid);
More information about the svn-src-projects
mailing list