Bug 1817 - IPv4 Identification field should consider protocol as well.
--- a/RELEASE_NOTES Tue Apr 29 10:01:47 2014 +0200
+++ b/RELEASE_NOTES Tue Apr 29 10:07:25 2014 +0200
@@ -39,7 +39,7 @@
- A new IPv6 routing protocol has been added: RIPng. This protocol is
an Interior Gateway Protocol and it is available in the Internet module.
- FlowMonitor can now track IPv6 packets.
-
+- IPv4 identification field value is now dependent on the protocol field.
Bugs fixed
----------
@@ -52,6 +52,7 @@
- Bug 1791 - TCP Endpoint never deallocates when closing
- Bug 1792 - Parameter logger constructor
- Bug 1808 - FlowMon relies on IPv4's Identification field to trace packets
+- Bug 1817 - IPv4 Identification field should consider protocol as well.
- Bug 1818 - FlowMonitor needs IPv6 support
- Bug 1821 - Setting an interface to Down state will cause various asserts in IPv6
- Bug 1829 - Multiple TCP socket entries
Binary file src/aodv/test/aodv-chain-regression-test-0-0.pcap has changed
Binary file src/aodv/test/aodv-chain-regression-test-1-0.pcap has changed
Binary file src/aodv/test/aodv-chain-regression-test-2-0.pcap has changed
Binary file src/aodv/test/aodv-chain-regression-test-3-0.pcap has changed
Binary file src/aodv/test/aodv-chain-regression-test-4-0.pcap has changed
Binary file src/aodv/test/bug-606-test-0-0.pcap has changed
Binary file src/aodv/test/bug-606-test-1-0.pcap has changed
Binary file src/aodv/test/bug-606-test-2-0.pcap has changed
Binary file src/aodv/test/tcp-chain-test-0-0.pcap has changed
Binary file src/aodv/test/tcp-chain-test-9-0.pcap has changed
Binary file src/aodv/test/udp-chain-test-0-0.pcap has changed
Binary file src/aodv/test/udp-chain-test-9-0.pcap has changed
--- a/src/internet/model/ipv4-l3-protocol.cc Tue Apr 29 10:01:47 2014 +0200
+++ b/src/internet/model/ipv4-l3-protocol.cc Tue Apr 29 10:07:25 2014 +0200
@@ -90,8 +90,6 @@
}
Ipv4L3Protocol::Ipv4L3Protocol()
- : m_identification (0)
-
{
NS_LOG_FUNCTION (this);
}
@@ -740,15 +738,18 @@
if (mayFragment == true)
{
ipHeader.SetMayFragment ();
- ipHeader.SetIdentification (m_identification);
- m_identification++;
+ ipHeader.SetIdentification (m_identification[protocol]);
+ m_identification[protocol]++;
}
else
{
ipHeader.SetDontFragment ();
- // TBD: set to zero here; will cause traces to change
- ipHeader.SetIdentification (m_identification);
- m_identification++;
+ // RFC 6864 does not state anything about atomic datagrams
+ // identification requirement:
+ // >> Originating sources MAY set the IPv4 ID field of atomic datagrams
+ // to any value.
+ ipHeader.SetIdentification (m_identification[protocol]);
+ m_identification[protocol]++;
}
if (Node::ChecksumEnabled ())
{
--- a/src/internet/model/ipv4-l3-protocol.h Tue Apr 29 10:01:47 2014 +0200
+++ b/src/internet/model/ipv4-l3-protocol.h Tue Apr 29 10:07:25 2014 +0200
@@ -408,7 +408,7 @@
Ipv4InterfaceList m_interfaces; //!< List of IPv4 interfaces.
uint8_t m_defaultTos; //!< Default TOS
uint8_t m_defaultTtl; //!< Default TTL
- uint16_t m_identification; //!< Identification
+ std::map<uint8_t, uint16_t> m_identification; //!< Identification (for each protocol)
Ptr<Node> m_node; //!< Node attached to stack.
/// Trace of sent packets
Binary file src/olsr/test/bug780-0-0.pcap has changed
Binary file src/olsr/test/bug780-1-0.pcap has changed
Binary file src/olsr/test/bug780-2-0.pcap has changed