[Ns-bugs] [Bug 926] New: olsr handling of multicast packets

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Sat May 29 08:41:25 PDT 2010


http://www.nsnam.org/bugzilla/show_bug.cgi?id=926

           Summary: olsr handling of multicast packets
           Product: ns-3
           Version: ns-3-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P4
         Component: olsr
        AssignedTo: gjcarneiro at gmail.com
        ReportedBy: tomh at tomh.org
                CC: ns-bugs at isi.edu
   Estimated Hours: 0.0


Reported by Ken Renard:
http://mailman.isi.edu/pipermail/ns-developers/2010-May/007981.html

I changed the patch to return false if lcb is null, so that a multicast
protocol at lower priority gets a chance to forward it.  If no comments, I will
commit this next week.

--- a/src/routing/olsr/olsr-routing-protocol.cc Thu May 27 08:34:16 2010 +0200
+++ b/src/routing/olsr/olsr-routing-protocol.cc Sat May 29 08:38:42 2010 -0700
@@ -3005,9 +3005,21 @@
   uint32_t iif = m_ipv4->GetInterfaceForDevice (idev);
   if (m_ipv4->IsDestinationAddress (dst, iif))
     {
-        NS_LOG_LOGIC ("Local delivery to " << dst);
-        lcb (p, header, iif);
-        return true;
+      if (lcb.IsNull () == false)
+        {
+          NS_LOG_LOGIC ("Local delivery to " << dst);
+          lcb (p, header, iif);
+          return true;
+        }
+      else
+        {
+          // The local delivery callback is null.  This may be a multicast
+          // or broadcast packet, so return false so that another 
+          // multicast routing protocol can handle it.  It should be possible
+          // to extend this to explicitly check whether it is a unicast
+          // packet, and invoke the error callback if so
+          return false;
+        }
     }

-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Ns-bugs mailing list