Author: adrian Date: Sun Jan 29 19:35:40 2012 New Revision: 230752 URL: http://svn.freebsd.org/changeset/base/230752
Log: Missing code for receiving MESH PREP that should be part of r230409. Submitted by: <montha...@gmail.com> Modified: head/sys/net80211/ieee80211_hwmp.c Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Sun Jan 29 18:54:25 2012 (r230751) +++ head/sys/net80211/ieee80211_hwmp.c Sun Jan 29 19:35:40 2012 (r230752) @@ -1044,12 +1044,21 @@ hwmp_recv_prep(struct ieee80211vap *vap, * Sequence number validation. */ hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); - if (HWMP_SEQ_LEQ(prep->prep_targetseq, hr->hr_seq)) { - IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, - "discard PREP from %6D, old seq no %u <= %u", - prep->prep_targetaddr, ":", - prep->prep_targetseq, hr->hr_seq); - return; + if ((rt->rt_flags & IEEE80211_MESHRT_FLAGS_VALID)) { + if (HWMP_SEQ_LT(prep->prep_targetseq, hr->hr_seq)) { + IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, + "discard PREP from %6D, old seq no %u < %u", + prep->prep_targetaddr, ":", + prep->prep_targetseq, hr->hr_seq); + return; + } else if (HWMP_SEQ_LEQ(prep->prep_targetseq, hr->hr_seq) && + prep->prep_metric > rt->rt_metric) { + IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, + "discard PREP from %6D, new metric %u > %u", + prep->prep_targetaddr, ":", + prep->prep_metric, rt->rt_metric); + return; + } } hr->hr_seq = prep->prep_targetseq; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"