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

(-)a/src/flow-monitor/model/ipv4-flow-probe.cc (-1 / +4 lines)
 Lines 359-365    Link Here 
359
          myReason = DROP_FRAGMENT_TIMEOUT;
359
          myReason = DROP_FRAGMENT_TIMEOUT;
360
          NS_LOG_DEBUG ("DROP_FRAGMENT_TIMEOUT");
360
          NS_LOG_DEBUG ("DROP_FRAGMENT_TIMEOUT");
361
          break;
361
          break;
362
362
        case Ipv4L3Protocol::DROP_MTU_TOO_LITTLE:
363
          myReason = DROP_MTU_TOO_LITTLE;
364
          NS_LOG_DEBUG ("DROP_MTU_TOO_LITTLE");
365
          break;
363
        default:
366
        default:
364
          myReason = DROP_INVALID_REASON;
367
          myReason = DROP_INVALID_REASON;
365
          NS_FATAL_ERROR ("Unexpected drop reason code " << reason);
368
          NS_FATAL_ERROR ("Unexpected drop reason code " << reason);
(-)a/src/flow-monitor/model/ipv4-flow-probe.h (+1 lines)
 Lines 69-74    Link Here 
69
    DROP_INTERFACE_DOWN,   /**< Interface is down so can not send packet */
69
    DROP_INTERFACE_DOWN,   /**< Interface is down so can not send packet */
70
    DROP_ROUTE_ERROR,   /**< Route error */
70
    DROP_ROUTE_ERROR,   /**< Route error */
71
    DROP_FRAGMENT_TIMEOUT, /**< Fragment timeout exceeded */
71
    DROP_FRAGMENT_TIMEOUT, /**< Fragment timeout exceeded */
72
    DROP_MTU_TOO_LITTLE, /**< MTU (or PMTU) lower than minimum */
72
73
73
    DROP_INVALID_REASON, /**< Fallback reason (no known reason) */
74
    DROP_INVALID_REASON, /**< Fallback reason (no known reason) */
74
  };
75
  };
(-)a/src/internet/model/ipv4-l3-protocol.cc (+9 lines)
 Lines 748-753    Link Here 
748
  Ptr<Ipv4Interface> outInterface = GetInterface (interface);
748
  Ptr<Ipv4Interface> outInterface = GetInterface (interface);
749
  NS_LOG_LOGIC ("Send via NetDevice ifIndex " << outDev->GetIfIndex () << " ipv4InterfaceIndex " << interface);
749
  NS_LOG_LOGIC ("Send via NetDevice ifIndex " << outDev->GetIfIndex () << " ipv4InterfaceIndex " << interface);
750
750
751
  // RFC 791, pg.25:
752
  //  Every internet module must be able to forward a datagram of 68
753
  //   octets without further fragmentation.  This is because an internet
754
  //   header may be up to 60 octets, and the minimum fragment is 8 octets.
755
  if (outInterface->GetDevice ()->GetMtu () < 68)
756
    {
757
      m_dropTrace (ipHeader, packet, DROP_MTU_TOO_LITTLE, m_node->GetObject<Ipv4> (), interface);
758
    }
759
751
  if (!route->GetGateway ().IsEqual (Ipv4Address ("0.0.0.0")))
760
  if (!route->GetGateway ().IsEqual (Ipv4Address ("0.0.0.0")))
752
    {
761
    {
753
      if (outInterface->IsUp ())
762
      if (outInterface->IsUp ())
(-)a/src/internet/model/ipv4-l3-protocol.h (-2 / +3 lines)
 Lines 98-105    Link Here 
98
    DROP_BAD_CHECKSUM,   /**< Bad checksum */
98
    DROP_BAD_CHECKSUM,   /**< Bad checksum */
99
    DROP_INTERFACE_DOWN,   /**< Interface is down so can not send packet */
99
    DROP_INTERFACE_DOWN,   /**< Interface is down so can not send packet */
100
    DROP_ROUTE_ERROR,   /**< Route error */
100
    DROP_ROUTE_ERROR,   /**< Route error */
101
    DROP_FRAGMENT_TIMEOUT /**< Fragment timeout exceeded */
101
    DROP_FRAGMENT_TIMEOUT, /**< Fragment timeout exceeded */
102
  };
102
    DROP_MTU_TOO_LITTLE, /**< MTU (or PMTU) lower than minimum */
103
 };
103
104
104
  /**
105
  /**
105
   * \brief Set node associated with this stack.
106
   * \brief Set node associated with this stack.
(-)a/src/internet/model/ipv6-l3-protocol.cc (+5 lines)
 Lines 888-893    Link Here 
888
      targetMtu = dev->GetMtu ();
888
      targetMtu = dev->GetMtu ();
889
    }
889
    }
890
890
891
  if (targetMtu<1280)
892
    {
893
      m_dropTrace (ipHeader, packet, DROP_MTU_TOO_LITTLE, m_node->GetObject<Ipv6> (), interface);
894
    }
895
891
  if (packet->GetSize () > targetMtu + 40) /* 40 => size of IPv6 header */
896
  if (packet->GetSize () > targetMtu + 40) /* 40 => size of IPv6 header */
892
    {
897
    {
893
      // Router => drop
898
      // Router => drop
(-)a/src/internet/model/ipv6-l3-protocol.h (+1 lines)
 Lines 81-86    Link Here 
81
    DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */
81
    DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */
82
    DROP_ROUTE_ERROR, /**< Route error */
82
    DROP_ROUTE_ERROR, /**< Route error */
83
    DROP_UNKNOWN_PROTOCOL, /**< Unknown L4 protocol */
83
    DROP_UNKNOWN_PROTOCOL, /**< Unknown L4 protocol */
84
    DROP_MTU_TOO_LITTLE, /**< MTU (or PMTU) lower than minimum */
84
  };
85
  };
85
86
86
  /**
87
  /**

Return to bug 1810