From owner-svn-src-head@FreeBSD.ORG Thu Feb 7 21:17:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B1864C92; Thu, 7 Feb 2013 21:17:35 +0000 (UTC) (envelope-from monthadar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A1D01E63; Thu, 7 Feb 2013 21:17:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r17LHZfj008389; Thu, 7 Feb 2013 21:17:35 GMT (envelope-from monthadar@svn.freebsd.org) Received: (from monthadar@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r17LHZ7Z008388; Thu, 7 Feb 2013 21:17:35 GMT (envelope-from monthadar@svn.freebsd.org) Message-Id: <201302072117.r17LHZ7Z008388@svn.freebsd.org> From: Monthadar Al Jaberi Date: Thu, 7 Feb 2013 21:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246498 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2013 21:17:35 -0000 Author: monthadar Date: Thu Feb 7 21:17:35 2013 New Revision: 246498 URL: http://svnweb.freebsd.org/changeset/base/246498 Log: Fix mesh path flag. * A bug occurs while in discovery mode which leaves a path marked with both Discover and Valid flag. This happens when receiving/sending PREQ and PREP in a particular order. Solution is to assign the Valid bit instead of oring it; Approved by: adrian (mentor) Modified: head/sys/net80211/ieee80211_hwmp.c Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Thu Feb 7 21:12:55 2013 (r246497) +++ head/sys/net80211/ieee80211_hwmp.c Thu Feb 7 21:17:35 2013 (r246498) @@ -995,8 +995,11 @@ hwmp_recv_preq(struct ieee80211vap *vap, rtorig->rt_metric = metric; rtorig->rt_nhops = preq->preq_hopcount + 1; ieee80211_mesh_rt_update(rtorig, preq->preq_lifetime); - /* path to orig is valid now */ - rtorig->rt_flags |= IEEE80211_MESHRT_FLAGS_VALID; + /* Path to orig is valid now. + * NB: we know it can't be Proxy, and if it is GATE + * it will be marked below. + */ + rtorig->rt_flags = IEEE80211_MESHRT_FLAGS_VALID; }else if ((hrtarg != NULL && HWMP_SEQ_EQ(hrtarg->hr_seq, PREQ_TSEQ(0)) && ((rtorig->rt_flags & IEEE80211_MESHRT_FLAGS_VALID) == 0)) ||