Author: monthadar
Date: Tue May  1 16:00:31 2012
New Revision: 234880
URL: http://svn.freebsd.org/changeset/base/234880

Log:
  * MeshForwarding update mesh_recv_indiv_data_to_fwrd to silently discard
  unknown meshDA instead of panic, which is allowed per amendment spec;
  
  Approved by: adrian

Modified:
  head/sys/net80211/ieee80211_mesh.c

Modified: head/sys/net80211/ieee80211_mesh.c
==============================================================================
--- head/sys/net80211/ieee80211_mesh.c  Tue May  1 15:58:10 2012        
(r234879)
+++ head/sys/net80211/ieee80211_mesh.c  Tue May  1 16:00:31 2012        
(r234880)
@@ -1137,7 +1137,19 @@ mesh_recv_indiv_data_to_fwrd(struct ieee
 
        /* set lifetime of addr3 (meshDA) to initial value */
        rt_meshda = ieee80211_mesh_rt_find(vap, qwh->i_addr3);
-       KASSERT(rt_meshda != NULL, ("no route"));
+       if (rt_meshda == NULL) {
+               IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_MESH, qwh->i_addr2,
+                   "no route to meshDA(%6D)", qwh->i_addr3, ":");
+               /*
+                * [Optional] any of the following three actions:
+                * o silently discard                           [X]
+                * o trigger a path discovery                   [ ]
+                * o inform TA that meshDA is unknown.          [ ]
+                */
+               /* XXX: stats */
+               return (-1);
+       }
+
        ieee80211_mesh_rt_update(rt_meshda, ticks_to_msecs(
            ms->ms_ppath->mpp_inact));
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to