Bug 1626 - Ipv6-only network can't use UDP or TCP
This commit is contained in:
@@ -398,10 +398,6 @@ InternetStackHelper::Install (Ptr<Node> node) const
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol");
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol");
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol");
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol");
|
||||
node->AggregateObject (m_tcpFactory.Create<Object> ());
|
||||
Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
|
||||
node->AggregateObject (factory);
|
||||
// Set routing
|
||||
Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
|
||||
Ptr<Ipv4RoutingProtocol> ipv4Routing = m_routing->Create (node);
|
||||
@@ -420,7 +416,7 @@ InternetStackHelper::Install (Ptr<Node> node) const
|
||||
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol");
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol");
|
||||
/* TODO add UdpL4Protocol/TcpL4Protocol for IPv6 */
|
||||
// Set routing
|
||||
Ptr<Ipv6> ipv6 = node->GetObject<Ipv6> ();
|
||||
Ptr<Ipv6RoutingProtocol> ipv6Routing = m_routingv6->Create (node);
|
||||
ipv6->SetRoutingProtocol (ipv6Routing);
|
||||
@@ -429,6 +425,14 @@ InternetStackHelper::Install (Ptr<Node> node) const
|
||||
ipv6->RegisterExtensions ();
|
||||
ipv6->RegisterOptions ();
|
||||
}
|
||||
|
||||
if (m_ipv4Enabled || m_ipv6Enabled)
|
||||
{
|
||||
CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol");
|
||||
node->AggregateObject (m_tcpFactory.Create<Object> ());
|
||||
Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
|
||||
node->AggregateObject (factory);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user