Date: Tue, 31 Jul 2012 07:31:48 +0000 (UTC) From: Monthadar Al Jaberi <monthadar@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238939 - head/sys/net80211 Message-ID: <201207310731.q6V7VmnE000531@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: monthadar Date: Tue Jul 31 07:31:47 2012 New Revision: 238939 URL: http://svn.freebsd.org/changeset/base/238939 Log: Fix bugs in net80211s found with wtap simulator. For description of the test scripts refer to projects/net80211_testsuite/wtap. * Test 007 showed a bug in intermediate PREP for a proxy entry. Resolved; * Test 002 showed a bug in the Addressing Mode flag for a PREQ. Resolved; Modified: head/sys/net80211/ieee80211_hwmp.c Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Tue Jul 31 07:22:50 2012 (r238938) +++ head/sys/net80211/ieee80211_hwmp.c Tue Jul 31 07:31:47 2012 (r238939) @@ -840,7 +840,7 @@ hwmp_rootmode_cb(void *arg) IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, vap->iv_bss, "%s", "send broadcast PREQ"); - preq.preq_flags = IEEE80211_MESHPREQ_FLAGS_AM; + preq.preq_flags = 0; if (ms->ms_flags & IEEE80211_MESHFLAGS_GATE) preq.preq_flags |= IEEE80211_MESHPREQ_FLAGS_GATE; if (hs->hs_rootmode == IEEE80211_HWMP_ROOTMODE_PROACTIVE) @@ -951,7 +951,7 @@ hwmp_recv_preq(struct ieee80211vap *vap, hrtarg = IEEE80211_MESH_ROUTE_PRIV(rttarg, struct ieee80211_hwmp_route); /* Address mode: ucast */ - if((preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AM) == 0 && + if(preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AM && rttarg == NULL && !IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0))) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_HWMP, @@ -1029,6 +1029,8 @@ hwmp_recv_preq(struct ieee80211vap *vap, hs->hs_seq = HWMP_SEQ_MAX(hs->hs_seq, PREQ_TSEQ(0)) + 1; prep.prep_flags = 0; + prep.prep_hopcount = 0; + IEEE80211_ADDR_COPY(prep.prep_targetaddr, vap->iv_myaddr); if (rttarg != NULL && /* if NULL it means we are the target */ rttarg->rt_flags & IEEE80211_MESHRT_FLAGS_PROXY) { IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, @@ -1038,13 +1040,13 @@ hwmp_recv_preq(struct ieee80211vap *vap, rttarg->rt_dest); /* update proxy seqno to HWMP seqno */ rttarg->rt_ext_seq = hs->hs_seq; + prep.prep_hopcount = rttarg->rt_nhops; + IEEE80211_ADDR_COPY(prep.prep_targetaddr, rttarg->rt_mesh_gate); } /* * Build and send a PREP frame. */ - prep.prep_hopcount = 0; prep.prep_ttl = ms->ms_ttl; - IEEE80211_ADDR_COPY(prep.prep_targetaddr, vap->iv_myaddr); prep.prep_targetseq = hs->hs_seq; prep.prep_lifetime = preq->preq_lifetime; prep.prep_metric = IEEE80211_MESHLMETRIC_INITIALVAL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207310731.q6V7VmnE000531>