Bug 1841 - FlowMonitor fails to install if IPv4 is not installed in the node

This commit is contained in:
Tommaso Pecorella
2014-01-21 22:52:52 +01:00
parent a9c97531cc
commit 281f06e639

View File

@@ -81,9 +81,13 @@ FlowMonitorHelper::Install (Ptr<Node> node)
{
Ptr<FlowMonitor> monitor = GetMonitor ();
Ptr<FlowClassifier> classifier = GetClassifier ();
Ptr<Ipv4FlowProbe> probe = Create<Ipv4FlowProbe> (monitor,
DynamicCast<Ipv4FlowClassifier> (classifier),
node);
Ptr<Ipv4L3Protocol> ipv4 = node->GetObject<Ipv4L3Protocol> ();
if (ipv4)
{
Ptr<Ipv4FlowProbe> probe = Create<Ipv4FlowProbe> (monitor,
DynamicCast<Ipv4FlowClassifier> (classifier),
node);
}
return m_flowMonitor;
}