diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2009-10-29 12:19:10 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2009-10-29 12:19:10 +0000 |
commit | d890529b305a4da9bde5bfb17108249ebcc64c50 (patch) | |
tree | b601a2d84675f899250882444e3b3647d4495c88 /sys/net80211/ieee80211_hwmp.c | |
parent | 4e178e30ad7182f42282bb9f890f9563f9ce5c38 (diff) | |
download | FreeBSD-src-d890529b305a4da9bde5bfb17108249ebcc64c50.zip FreeBSD-src-d890529b305a4da9bde5bfb17108249ebcc64c50.tar.gz |
Update the route's sequence number upon receiving a RANN.
MFC after: 3 days
Diffstat (limited to 'sys/net80211/ieee80211_hwmp.c')
-rw-r--r-- | sys/net80211/ieee80211_hwmp.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index ea06b0e..66055d7 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -1239,15 +1239,18 @@ hwmp_recv_rann(struct ieee80211vap *vap, struct ieee80211_node *ni, 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); + } } } |