Subject: [dtn-users] Ethernet announce patch

From: Lana Black <[email-masked]>
Date: Mon, 29 Apr 2013 21:59:17 +0000

Hi,

The ethernet announce code I submitted some time ago lacks
gettimeofday() call, which results in beacons flood. The patch attached
resolves this issue.

With best regards.
diff --git a/servlib/discovery/EthAnnounce.cc b/servlib/discovery/EthAnnounce.cc
index 426817d..dd62502 100644
--- a/servlib/discovery/EthAnnounce.cc
+++ b/servlib/discovery/EthAnnounce.cc
@@ -49,6 +49,8 @@ size_t EthAnnounce::format_advertisement(u_char *bp, size_t len)
     beacon->eid_len = htons(eid.length());
     memcpy(beacon->sender_eid, eid.c_str(), eid.length());
 
+    ::gettimeofday(&data_sent_,0);
+
     return sizeof(*beacon) + eid.length();
 }