From 6c23af63de7b1a83f8b21ce7f7f00c4adf0d98dd Mon Sep 17 00:00:00 2001 From: monthadar Date: Thu, 7 Feb 2013 21:30:58 +0000 Subject: [PATCH] Mesh HWMP PERR bug fixes. * When calling ieee80211_mesh_rt_flush_peer, the rt->rt_dest argument should not be passed because it can get freed before invalidating the other routes that depends on it to compare with next_hop. Use PERR_DADDR(i) instead; Approved by: adrian (mentor) --- sys/net80211/ieee80211_hwmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index 707a7903d90d..206a4a4695e1 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -1570,7 +1570,7 @@ hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni, "PERR, unknown reason code %u\n", PERR_DFLAGS(i)); goto done; /* XXX: stats?? */ } - ieee80211_mesh_rt_flush_peer(vap, rt->rt_dest); + ieee80211_mesh_rt_flush_peer(vap, PERR_DADDR(i)); KASSERT(j < 32, ("PERR, error ndest >= 32 (%u)", j)); } if (j == 0) {