[Ns-bugs] [Bug 468] Test for possibly unreachable code-- please file a bug report, with a test case, if this is ever hit

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Thu Jan 15 22:22:31 PST 2009


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





--- Comment #7 from Tom Henderson <tomh at tomh.org>  2009-01-16 01:22:31 EDT ---
(In reply to comment #6)
> Nevermind.  The bug reappears, only requiring more simulated clients to do so.  
> 
> Now it works at 36 clients, and fails at 37.  Before copying in the files
> suggested, the numbers were 23 and 24, respectively.
> 
> Should I post this under 451's entry?
> 
No, this is fine, it may be a separate problem.

The below is half-baked, but can you see whether it fixes your problem?

diff -r 8e5d0354c509 src/internet-stack/arp-cache.cc
--- a/src/internet-stack/arp-cache.cc   Wed Jan 14 15:36:19 2009 +0000
+++ b/src/internet-stack/arp-cache.cc   Thu Jan 15 22:34:02 2009 -0800
@@ -213,7 +213,12 @@ ArpCache::HandleWaitReplyTimeout (void)
                 }
             }
        }
-
+      else
+        {
+          // This will cause the entry expiration time to line up
+          // with the WaitReply timer for future timeouts
+          entry->UpdateSeen ();
+        }
     }
   if (restartWaitReplyTimer)
     {
diff -r 8e5d0354c509 src/internet-stack/arp-cache.h
--- a/src/internet-stack/arp-cache.h    Wed Jan 14 15:36:19 2009 +0000
+++ b/src/internet-stack/arp-cache.h    Thu Jan 15 22:34:02 2009 -0800
@@ -199,6 +199,7 @@ public:
      */
     void ClearRetries (void);

+    void UpdateSeen (void);
   private:
     enum ArpCacheEntryState_e {
       ALIVE,
@@ -206,7 +207,6 @@ public:
       DEAD
     };

-    void UpdateSeen (void);
     Time GetTimeout (void) const;
     ArpCache *m_arp;
     ArpCacheEntryState_e m_state;


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


More information about the Ns-bugs mailing list