# HG changeset patch # Parent b5da7eda050332f2c4f91e274d72e2fef0719ab3 # User Tommaso Pecorella # Date 1376612511 -7200 Addendum to bug 1522 diff --git a/CHANGES.html b/CHANGES.html --- a/CHANGES.html +++ b/CHANGES.html @@ -73,6 +73,9 @@ examples/ipv6/fragmentation-ipv6-two-MTU.cc for an example.
  • Radvd application have a new Helper. See the updated examples/ipv6/radvd.cc for an example.
  • +
  • InternetStackHelper have two new functions:SetIpv4ArpJitter (bool enable) + and SetIpv6NsRsJitter (bool enable) to enable/disable + the random jitter on IPv4's ARP and IPv6's NS/RS.
  • Changes to existing API:

    @@ -131,6 +134,13 @@ cmd.PrintHelp (std::cerr); +
  • IPv4's ARP and IPv6's NS/RS are now issued with a random delay. + The delay is, by default, between 0 and 10ms. + This behaviour can be modify by using ArpL3Protocol's + RequestJitter and Icmpv6L4Protocol's SolicitationJitter + attributes or by using the new InternetStackHelper functions. +
  • +
    diff --git a/RELEASE_NOTES b/RELEASE_NOTES --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -50,8 +50,10 @@ Bugs fixed ---------- - Bug 760 - IP address removal can be painful +- Bug 1190 - Suppress hello if bcast was sent within the last hello interval - Bug 1296 - Enhancement in Ipv[4,6]RoutingHelper - Bug 1390 - ICMPv6 Redirect are handled correctly only for /64 networks +- Bug 1522 - Hidden node scenario leads to ARP failure - Bug 1643 - NdiscCache creation and existence checks - Bug 1646 - ICMPv6 Redirect are sent from global address instead of link-local - Bug 1662 - m_type not set for Ipv6OptionRouterAlertHeader @@ -79,6 +81,7 @@ - Bug 1738 - strict aliasing compiler bug - Bug 1742 - IPv6 HbH and Dst Extension Header size is not correctly calculated - Bug 1752 - RadvdInterface m_defaultLifeTime is set to milliseconds instead of seconds +- Bug 1753 - Halting Issue with DistributedSimulatorImpl - Bug 1754 - Missing GIL lock in generated callback destructor Known issues diff --git a/src/internet/helper/internet-stack-helper.cc b/src/internet/helper/internet-stack-helper.cc --- a/src/internet/helper/internet-stack-helper.cc +++ b/src/internet/helper/internet-stack-helper.cc @@ -234,7 +234,10 @@ : m_routing (0), m_routingv6 (0), m_ipv4Enabled (true), - m_ipv6Enabled (true) + m_ipv6Enabled (true), + m_ipv4ArpJitterEnabled (true), + m_ipv6NsRsEnabled (true) + { Initialize (); } @@ -269,6 +272,8 @@ m_ipv4Enabled = o.m_ipv4Enabled; m_ipv6Enabled = o.m_ipv6Enabled; m_tcpFactory = o.m_tcpFactory; + m_ipv4ArpJitterEnabled = o.m_ipv4ArpJitterEnabled; + m_ipv6NsRsEnabled = o.m_ipv6NsRsEnabled; } InternetStackHelper & @@ -292,6 +297,8 @@ m_routingv6 = 0; m_ipv4Enabled = true; m_ipv6Enabled = true; + m_ipv4ArpJitterEnabled = true; + m_ipv6NsRsEnabled = true; Initialize (); } @@ -320,6 +327,16 @@ m_ipv6Enabled = enable; } +void InternetStackHelper::SetIpv4ArpJitter (bool enable) +{ + m_ipv4ArpJitterEnabled = enable; +} + +void InternetStackHelper::SetIpv6NsRsJitter (bool enable) +{ + m_ipv6NsRsEnabled = enable; +} + int64_t InternetStackHelper::AssignStreams (NodeContainer c, int64_t stream) { @@ -417,6 +434,11 @@ CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol"); CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol"); CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol"); + if (m_ipv4ArpJitterEnabled == false) + { + Ptr arp = node->GetObject (); + arp->SetAttribute ("RequestJitter", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]")); + } // Set routing Ptr ipv4 = node->GetObject (); Ptr ipv4Routing = m_routing->Create (node); @@ -435,6 +457,11 @@ CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol"); CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol"); + if (m_ipv6NsRsEnabled == false) + { + Ptr icmpv6l4 = node->GetObject (); + icmpv6l4->SetAttribute ("SolicitationJitter", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]")); + } // Set routing Ptr ipv6 = node->GetObject (); Ptr ipv6Routing = m_routingv6->Create (node); diff --git a/src/internet/helper/internet-stack-helper.h b/src/internet/helper/internet-stack-helper.h --- a/src/internet/helper/internet-stack-helper.h +++ b/src/internet/helper/internet-stack-helper.h @@ -178,7 +178,19 @@ */ void SetIpv6StackInstall (bool enable); - /** + /** + * \brief Enable/disable IPv4 ARP Jitter. + * \param enable enable state + */ + void SetIpv4ArpJitter (bool enable); + + /** + * \brief Enable/disable IPv6 NS and RS Jitter. + * \param enable enable state + */ + void SetIpv6NsRsJitter (bool enable); + + /** * Assign a fixed random variable stream number to the random variables * used by this model. Return the number of streams (possibly zero) that * have been assigned. The Install() method should have previously been @@ -303,6 +315,16 @@ * \brief IPv6 install state (enabled/disabled) ? */ bool m_ipv6Enabled; + + /** + * \brief IPv4 ARP Jitter state (enabled/disabled) ? + */ + bool m_ipv4ArpJitterEnabled; + + /** + * \brief IPv6 IPv6 NS and RS Jitter state (enabled/disabled) ? + */ + bool m_ipv6NsRsEnabled; }; } // namespace ns3