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

(-)a/src/aodv/model/aodv-routing-protocol.cc (+8 lines)
 Lines 521-526    Link Here 
521
      return true;
521
      return true;
522
    }
522
    }
523
523
524
  // Check if input device supports IP forwarding
525
  if (m_ipv4->IsForwarding (iif) == false)
526
    {
527
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
528
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
529
      return true;
530
    }
531
524
  // Forwarding
532
  // Forwarding
525
  return Forwarding (p, header, ucb, ecb);
533
  return Forwarding (p, header, ucb, ecb);
526
}
534
}
(-)a/src/dsdv/model/dsdv-routing-protocol.cc (+9 lines)
 Lines 467-472    Link Here 
467
        }
467
        }
468
      return true;
468
      return true;
469
    }
469
    }
470
471
  // Check if input device supports IP forwarding
472
  if (m_ipv4->IsForwarding (iif) == false)
473
    {
474
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
475
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
476
      return true;
477
    }
478
470
  RoutingTableEntry toDst;
479
  RoutingTableEntry toDst;
471
  if (m_routingTable.LookupRoute (dst,toDst))
480
  if (m_routingTable.LookupRoute (dst,toDst))
472
    {
481
    {
(-)a/src/internet/model/ipv4-global-routing.cc (-1 / +1 lines)
 Lines 513-519    Link Here 
513
    {
513
    {
514
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
514
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
515
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
515
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
516
      return false;
516
      return true;
517
    }
517
    }
518
  // Next, try to find a route
518
  // Next, try to find a route
519
  NS_LOG_LOGIC ("Unicast destination- looking up global route");
519
  NS_LOG_LOGIC ("Unicast destination- looking up global route");
(-)a/src/internet/model/ipv4-l3-protocol.cc (+2 lines)
 Lines 1396-1401    Link Here 
1396
  NS_LOG_FUNCTION (this << p << ipHeader << sockErrno);
1396
  NS_LOG_FUNCTION (this << p << ipHeader << sockErrno);
1397
  NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno); 
1397
  NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno); 
1398
  m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv4> (), 0);
1398
  m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv4> (), 0);
1399
1400
  // \todo Send an ICMP no route.
1399
}
1401
}
1400
1402
1401
void
1403
void
(-)a/src/internet/model/ipv4-list-routing.cc (-1 / +1 lines)
 Lines 161-167    Link Here 
161
    {
161
    {
162
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
162
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
163
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
163
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
164
      return false;
164
      return true;
165
    }
165
    }
166
  // Next, try to find a route
166
  // Next, try to find a route
167
  // If we have already delivered a packet locally (e.g. multicast)
167
  // If we have already delivered a packet locally (e.g. multicast)
(-)a/src/internet/model/ipv4-static-routing.cc (-1 / +1 lines)
 Lines 543-549    Link Here 
543
    {
543
    {
544
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
544
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
545
      ecb (p, ipHeader, Socket::ERROR_NOROUTETOHOST);
545
      ecb (p, ipHeader, Socket::ERROR_NOROUTETOHOST);
546
      return false;
546
      return true;
547
    }
547
    }
548
  // Next, try to find a route
548
  // Next, try to find a route
549
  Ptr<Ipv4Route> rtentry = LookupStatic (ipHeader.GetDestination ());
549
  Ptr<Ipv4Route> rtentry = LookupStatic (ipHeader.GetDestination ());
(-)a/src/internet/model/ipv6-l3-protocol.cc (-1 / +1 lines)
 Lines 1230-1236    Link Here 
1230
  NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ());
1230
  NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ());
1231
1231
1232
  // Drop RFC 3849 packets: 2001:db8::/32
1232
  // Drop RFC 3849 packets: 2001:db8::/32
1233
  if (header.GetDestinationAddress().IsDocumentation())
1233
  if (header.GetDestinationAddress().IsDocumentation ())
1234
    {
1234
    {
1235
      NS_LOG_WARN ("Received a packet for 2001:db8::/32 (documentation class).  Drop.");
1235
      NS_LOG_WARN ("Received a packet for 2001:db8::/32 (documentation class).  Drop.");
1236
      m_dropTrace (header, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv6> (), 0);
1236
      m_dropTrace (header, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv6> (), 0);
(-)a/src/internet/model/ipv6-list-routing.cc (-1 / +1 lines)
 Lines 115-121    Link Here 
115
    {
115
    {
116
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
116
      NS_LOG_LOGIC ("Forwarding disabled for this interface");
117
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
117
      ecb (p, header, Socket::ERROR_NOROUTETOHOST);
118
      return false;
118
      return true;
119
    }
119
    }
120
120
121
  // We disable error callback for the called protocols.
121
  // We disable error callback for the called protocols.
(-)a/src/internet/model/ipv6-static-routing.cc (-1 / +1 lines)
 Lines 623-629    Link Here 
623
        {
623
        {
624
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
624
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
625
        }
625
        }
626
      return false;
626
      return true;
627
    }
627
    }
628
  // Next, try to find a route
628
  // Next, try to find a route
629
  NS_LOG_LOGIC ("Unicast destination");
629
  NS_LOG_LOGIC ("Unicast destination");
(-)a/src/internet/model/rip.cc (-1 / +1 lines)
 Lines 268-274    Link Here 
268
        {
268
        {
269
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
269
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
270
        }
270
        }
271
      return false;
271
      return true;
272
    }
272
    }
273
  // Next, try to find a route
273
  // Next, try to find a route
274
  NS_LOG_LOGIC ("Unicast destination");
274
  NS_LOG_LOGIC ("Unicast destination");
(-)a/src/internet/model/ripng.cc (-1 / +1 lines)
 Lines 244-250    Link Here 
244
        {
244
        {
245
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
245
          ecb (p, header, Socket::ERROR_NOROUTETOHOST);
246
        }
246
        }
247
      return false;
247
      return true;
248
    }
248
    }
249
  // Next, try to find a route
249
  // Next, try to find a route
250
  NS_LOG_LOGIC ("Unicast destination");
250
  NS_LOG_LOGIC ("Unicast destination");

Return to bug 2402