Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 2009 12:19:10 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198581 - head/sys/net80211
Message-ID:  <200910291219.n9TCJAR7096066@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Thu Oct 29 12:19:10 2009
New Revision: 198581
URL: http://svn.freebsd.org/changeset/base/198581

Log:
  Update the route's sequence number upon receiving a RANN.
  
  MFC after:	3 days

Modified:
  head/sys/net80211/ieee80211_hwmp.c

Modified: head/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- head/sys/net80211/ieee80211_hwmp.c	Thu Oct 29 11:52:26 2009	(r198580)
+++ head/sys/net80211/ieee80211_hwmp.c	Thu Oct 29 12:19:10 2009	(r198581)
@@ -1239,15 +1239,18 @@ hwmp_recv_rann(struct ieee80211vap *vap,
 		return;
 	}
 	hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
-	if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq) && rann->rann_ttl > 1 &&
-	    rann->rann_hopcount < hs->hs_maxhops &&
-	    (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) {
-		memcpy(&prann, rann, sizeof(prann));
-		prann.rann_hopcount += 1;
-		prann.rann_ttl -= 1;
-		prann.rann_metric += ms->ms_pmetric->mpm_metric(ni);
-		hwmp_send_rann(vap->iv_bss, vap->iv_myaddr, broadcastaddr,
-		    &prann);
+	if (HWMP_SEQ_GT(rann->rann_seq, hr->hr_seq)) {
+		hr->hr_seq = rann->rann_seq;
+		if (rann->rann_ttl > 1 &&
+		    rann->rann_hopcount < hs->hs_maxhops &&
+		    (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) {
+			memcpy(&prann, rann, sizeof(prann));
+			prann.rann_hopcount += 1;
+			prann.rann_ttl -= 1;
+			prann.rann_metric += ms->ms_pmetric->mpm_metric(ni);
+			hwmp_send_rann(vap->iv_bss, vap->iv_myaddr,
+			    broadcastaddr, &prann);
+		}
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910291219.n9TCJAR7096066>