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

(-)a/src/internet-stack/ipv4-raw-socket-impl.cc (+8 lines)
 Lines 179-184    Link Here 
179
      SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number 
179
      SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number 
180
      Ptr<Ipv4Route> route;
180
      Ptr<Ipv4Route> route;
181
      Ptr<NetDevice> oif = m_boundnetdevice; //specify non-zero if bound to a source address
181
      Ptr<NetDevice> oif = m_boundnetdevice; //specify non-zero if bound to a source address
182
      if (!oif && m_src != Ipv4Address::GetAny ())
183
        {
184
          int32_t index = ipv4->GetInterfaceForAddress (m_src);
185
          NS_ASSERT (index >= 0);
186
          oif = ipv4->GetNetDevice (index);
187
          NS_LOG_LOGIC ("Set index " << oif << "from source " << m_src);
188
        }
189
182
      // TBD-- we could cache the route and just check its validity
190
      // TBD-- we could cache the route and just check its validity
183
      route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_);
191
      route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_);
184
      if (route != 0)
192
      if (route != 0)

Return to bug 859