View | Details | Raw Unified | Return to bug 642
Collapse All | Expand All

(-)a/src/helper/internet-stack-helper.cc (-2 / +8 lines)
 Lines 171-176   namespace ns3 { Link Here 
171
171
172
std::vector<InternetStackHelper::Trace> InternetStackHelper::m_traces;
172
std::vector<InternetStackHelper::Trace> InternetStackHelper::m_traces;
173
std::string InternetStackHelper::m_pcapBaseFilename;
173
std::string InternetStackHelper::m_pcapBaseFilename;
174
bool InternetStackHelper::m_isInitialized = false;
174
175
175
InternetStackHelper::InternetStackHelper ()
176
InternetStackHelper::InternetStackHelper ()
176
{
177
{
 Lines 178-185   InternetStackHelper::InternetStackHelper Link Here 
178
  static Ipv4StaticRoutingHelper staticRouting;
179
  static Ipv4StaticRoutingHelper staticRouting;
179
  static Ipv4GlobalRoutingHelper globalRouting;
180
  static Ipv4GlobalRoutingHelper globalRouting;
180
  static Ipv4ListRoutingHelper listRouting;
181
  static Ipv4ListRoutingHelper listRouting;
181
  listRouting.Add (staticRouting, 0);
182
  if (m_isInitialized == false)
182
  listRouting.Add (globalRouting, -10);
183
    {
184
      // Only add these once
185
      listRouting.Add (staticRouting, 0);
186
      listRouting.Add (globalRouting, -10);
187
      m_isInitialized = true;
188
    }
183
  SetRoutingHelper (listRouting);
189
  SetRoutingHelper (listRouting);
184
}
190
}
185
191
(-)a/src/helper/internet-stack-helper.h (+1 lines)
 Lines 173-178   private: Link Here 
173
  static std::string m_pcapBaseFilename;
173
  static std::string m_pcapBaseFilename;
174
  static uint32_t GetNodeIndex (std::string context);
174
  static uint32_t GetNodeIndex (std::string context);
175
  static std::vector<Trace> m_traces;
175
  static std::vector<Trace> m_traces;
176
  static bool m_isInitialized;
176
};
177
};
177
178
178
} // namespace ns3
179
} // namespace ns3

Return to bug 642