diff --git a/AUTHORS b/AUTHORS
index 6caa71e5a..9f0e98c95 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -33,6 +33,7 @@ Julien Boite (juboite@gmail.com)
Biljana Bojovic (bbojovic@cttc.es)
Elena Borovkova (borokovaes@iitp.ru)
Rahul Bothra (rrbothra@gmail.com)
+Caleb Bowers (caleb.bowers@nel.navy.mil, cbowers1020@gmail.com)
Pavel Boyko (boyko@iitp.ru)
Matthew Bradbury (matt-bradbury@live.co.uk)
Dan Broyles (muxman@sbcglobal.net)
diff --git a/CHANGES.html b/CHANGES.html
index 642f0047a..2a3c8b49e 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -73,6 +73,7 @@ us a note on ns-developers mailing list.
- Nix-Vector routing supports topologies with multiple WiFi networks using the same WiFi channel object.
- ConfigStore does not save anymore OBSOLETE Attributes.
+- The Ipv4L3Protocol Duplicate detection now accounts for transmitted packets, so a transmitting multicast node will not forward its own packets.
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 09f44118b..8dd510880 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -38,6 +38,7 @@ New user-visible features
Bugs fixed
----------
+- (internet) ipv4-l3-protocol.cc duplicate detection now accounts for sent packets, not just forwards.
Release 3.34
=============
diff --git a/src/internet/model/ipv4-l3-protocol.cc b/src/internet/model/ipv4-l3-protocol.cc
index d8c27b139..d543f48b0 100644
--- a/src/internet/model/ipv4-l3-protocol.cc
+++ b/src/internet/model/ipv4-l3-protocol.cc
@@ -804,6 +804,10 @@ Ipv4L3Protocol::Send (Ptr packet,
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 1b: passed in with route and valid gateway");
int32_t interface = GetInterfaceForDevice (route->GetOutputDevice ());
m_sendOutgoingTrace (ipHeader, packet, interface);
+ if (m_enableDpd && ipHeader.GetDestination ().IsMulticast ())
+ {
+ UpdateDuplicate (packet, ipHeader);
+ }
SendRealOut (route, packet->Copy (), ipHeader);
return;
}
diff --git a/src/internet/test/ipv4-deduplication-test.cc b/src/internet/test/ipv4-deduplication-test.cc
index 57b5a1c53..f8a85deec 100644
--- a/src/internet/test/ipv4-deduplication-test.cc
+++ b/src/internet/test/ipv4-deduplication-test.cc
@@ -424,6 +424,11 @@ Ipv4DeduplicationTest::CheckPackets (const std::string &name)
std::map packets = {
{"A", 14}, {"B", 16}, {"C", 16}, {"D", 16}, {"E", 4}
};
+
+ // a priori determined packet receptions based on
+ std:: map packetsDuped = {
+ {"A", 0}, {"B", 1}, {"C", 1}, {"D", 1}, {"E", 1}
+ };
// a priori determined packet receptions based on initial TTL of 4, degenerate de-dup
// There are TTL (4) rounds of packets. Each round a node will register a
// received packet if another connected node transmits. A misses the 1st round
@@ -433,12 +438,10 @@ Ipv4DeduplicationTest::CheckPackets (const std::string &name)
{"A", 3}, {"B", 4}, {"C", 4}, {"D", 3}, {"E", 2}
};
- NS_TEST_ASSERT_MSG_NE ((m_packetCountMap.find (name) == m_packetCountMap.end ()), true,
- "No packets received for node " << name);
switch (m_mode)
{
case ENABLED:
- NS_TEST_EXPECT_MSG_EQ (m_packetCountMap[name], 1, "Wrong number of packets received for node " << name);
+ NS_TEST_ASSERT_MSG_EQ (m_packetCountMap[name], packetsDuped[name], "Wrong number of packets received for node " << name);
break;
case DISABLED:
NS_TEST_EXPECT_MSG_EQ (m_packetCountMap[name], packets[name], "Wrong number of packets received for node " << name);
@@ -457,10 +460,10 @@ Ipv4DeduplicationTest::CheckDrops (const std::string &name)
{
case ENABLED:
// a priori determined packet drops based on initial TTL of 4, enabled de-dup;
- // A hears from B & C
+ // A hears from B & C -- > 2 drops
// D hears from B, C, AND E
- // B (C) hears from A, C (B), D, and A again
- drops = {{"A", 1}, {"B", 3}, {"C", 3}, {"D", 2}, {"E", 0}};
+ // B (C) hears from A, C (B), D,
+ drops = {{"A", 2}, {"B", 2}, {"C", 2}, {"D", 2}, {"E", 0}};
break;
case DISABLED:
// a priori determined packet drops based on initial TTL of 4, disabled de-dup