From owner-svn-src-head@FreeBSD.ORG Tue May 1 16:09:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E752B1065673; Tue, 1 May 2012 16:09:44 +0000 (UTC) (envelope-from monthadar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2AE38FC18; Tue, 1 May 2012 16:09:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q41G9iTu033811; Tue, 1 May 2012 16:09:44 GMT (envelope-from monthadar@svn.freebsd.org) Received: (from monthadar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q41G9inu033809; Tue, 1 May 2012 16:09:44 GMT (envelope-from monthadar@svn.freebsd.org) Message-Id: <201205011609.q41G9inu033809@svn.freebsd.org> From: Monthadar Al Jaberi Date: Tue, 1 May 2012 16:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234887 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 01 May 2012 16:09:45 -0000 Author: monthadar Date: Tue May 1 16:09:44 2012 New Revision: 234887 URL: http://svn.freebsd.org/changeset/base/234887 Log: * PREQ acceptance criteria updated to check for proxy condition as in amendment; Approved by: adrian Modified: head/sys/net80211/ieee80211_hwmp.c Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Tue May 1 16:08:46 2012 (r234886) +++ head/sys/net80211/ieee80211_hwmp.c Tue May 1 16:09:44 2012 (r234887) @@ -907,13 +907,17 @@ hwmp_recv_preq(struct ieee80211vap *vap, PREQ_TADDR(0), ":"); /* - * Acceptance criteria: if the PREQ is not for us or not broadcast + * Acceptance criteria: (if the PREQ is not for us or not broadcast, + * or an external mac address not proxied by us), * AND forwarding is disabled, discard this PREQ. - * XXX: need to check PROXY */ - if ((!IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0)) || - !IEEE80211_IS_MULTICAST(PREQ_TADDR(0))) && - !(ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) { + rttarg = ieee80211_mesh_rt_find(vap, PREQ_TADDR(0)); + if (!(ms->ms_flags & IEEE80211_MESHFLAGS_FWD) && + (!IEEE80211_ADDR_EQ(vap->iv_myaddr, PREQ_TADDR(0)) || + !IEEE80211_IS_MULTICAST(PREQ_TADDR(0)) || + (rttarg != NULL && + rttarg->rt_flags & IEEE80211_MESHRT_FLAGS_PROXY && + IEEE80211_ADDR_EQ(vap->iv_myaddr, rttarg->rt_mesh_gate)))) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_HWMP, preq->preq_origaddr, NULL, "%s", "not accepting PREQ"); return; @@ -922,7 +926,6 @@ hwmp_recv_preq(struct ieee80211vap *vap, * Acceptance criteria: if unicast addressed * AND no valid forwarding for Target of PREQ, discard this PREQ. */ - rttarg = ieee80211_mesh_rt_find(vap, PREQ_TADDR(0)); if(rttarg != NULL) hrtarg = IEEE80211_MESH_ROUTE_PRIV(rttarg, struct ieee80211_hwmp_route);