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

(-)ns-3.7/src/internet-stack/ipv4-l3-protocol.cc (-1 / +9 lines)
 Lines 603-609    Link Here 
603
  Socket::SocketErrno errno_; 
603
  Socket::SocketErrno errno_; 
604
  Ptr<NetDevice> oif (0); // unused for now
604
  Ptr<NetDevice> oif (0); // unused for now
605
  ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
605
  ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
606
  Ptr<Ipv4Route> newRoute = m_routingProtocol->RouteOutput (packet, ipHeader, oif, errno_);
606
  Ptr<Ipv4Route> newRoute;
607
  if (m_routingProtocol != 0)
608
    {
609
      newRoute = m_routingProtocol->RouteOutput (packet, ipHeader, oif, errno_);
610
    }
611
  else
612
    {
613
      NS_LOG_ERROR ("Ipv4L3Protocol::Send: m_routingProtocol == 0");
614
    }
607
  if (newRoute)
615
  if (newRoute)
608
    {
616
    {
609
      int32_t interface = GetInterfaceForDevice (newRoute->GetOutputDevice ());
617
      int32_t interface = GetInterfaceForDevice (newRoute->GetOutputDevice ());
(-)ns-3.7/src/internet-stack/tcp-l4-protocol.cc (-2 / +18 lines)
 Lines 584-590    Link Here 
584
      Socket::SocketErrno errno_;
584
      Socket::SocketErrno errno_;
585
      Ptr<Ipv4Route> route;
585
      Ptr<Ipv4Route> route;
586
      Ptr<NetDevice> oif (0); //specify non-zero if bound to a source address
586
      Ptr<NetDevice> oif (0); //specify non-zero if bound to a source address
587
      route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_);
587
      if (ipv4->GetRoutingProtocol () != 0)
588
        {
589
          route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_);
590
        }
591
      else
592
        {
593
          NS_LOG_ERROR ("No IPV4 Routing Protocol");
594
          route = 0;
595
        }
588
      ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
596
      ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
589
    }
597
    }
590
}
598
}
 Lines 623-629    Link Here 
623
      header.SetProtocol (PROT_NUMBER);
631
      header.SetProtocol (PROT_NUMBER);
624
      Socket::SocketErrno errno_;
632
      Socket::SocketErrno errno_;
625
      Ptr<Ipv4Route> route;
633
      Ptr<Ipv4Route> route;
626
      route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_);
634
      if (ipv4->GetRoutingProtocol () != 0)
635
        {
636
          route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_);
637
        }
638
      else
639
        {
640
          NS_LOG_ERROR ("No IPV4 Routing Protocol");
641
          route = 0;
642
        }
627
      ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
643
      ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route);
628
    }
644
    }
629
  else
645
  else
(-)ns-3.7/src/internet-stack/tcp-socket-impl.cc (-1 / +6 lines)
 Lines 1132-1137    Link Here 
1132
    {
1132
    {
1133
      return false; // No data exists
1133
      return false; // No data exists
1134
    }
1134
    }
1135
  if (m_endPoint == 0)
1136
    {
1137
      NS_LOG_INFO ("TcpSocketImpl::SendPendingData: No endpoint; m_shutdownSend=" << m_shutdownSend);
1138
      return false; // Is this the right way to handle this condition?
1139
    }
1135
  uint32_t nPacketsSent = 0;
1140
  uint32_t nPacketsSent = 0;
1136
  while (m_pendingData->SizeFromSeq (m_firstPendingSequence, m_nextTxSequence))
1141
  while (m_pendingData->SizeFromSeq (m_firstPendingSequence, m_nextTxSequence))
1137
    {
1142
    {
 Lines 1181-1187    Link Here 
1181
      if (m_shutdownSend)
1186
      if (m_shutdownSend)
1182
        {
1187
        {
1183
          m_errno = ERROR_SHUTDOWN;
1188
          m_errno = ERROR_SHUTDOWN;
1184
          return -1;
1189
          return false;
1185
        }
1190
        }
1186
      
1191
      

Return to bug 804