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

(-)a/src/internet/model/ipv4-l3-protocol.cc (-3 / +15 lines)
 Lines 1095-1105    Link Here 
1095
{
1095
{
1096
  NS_LOG_FUNCTION (this << i);
1096
  NS_LOG_FUNCTION (this << i);
1097
  Ptr<Ipv4Interface> interface = GetInterface (i);
1097
  Ptr<Ipv4Interface> interface = GetInterface (i);
1098
  interface->SetUp ();
1099
1098
1100
  if (m_routingProtocol != 0)
1099
  // RFC 791, pg.25:
1100
  //  Every internet module must be able to forward a datagram of 68
1101
  //  octets without further fragmentation.  This is because an internet
1102
  //  header may be up to 60 octets, and the minimum fragment is 8 octets.
1103
  if (interface->GetDevice ()->GetMtu () >= 68)
1101
    {
1104
    {
1102
      m_routingProtocol->NotifyInterfaceUp (i);
1105
      interface->SetUp ();
1106
1107
      if (m_routingProtocol != 0)
1108
        {
1109
          m_routingProtocol->NotifyInterfaceUp (i);
1110
        }
1111
    }
1112
  else
1113
    {
1114
      NS_LOG_LOGIC ("Interface " << int(i) << " is set to be down for IPv4. Reason: not respecting minimum IPv4 MTU (68 octects)");
1103
    }
1115
    }
1104
}
1116
}
1105
1117
(-)a/src/internet/model/ipv6-l3-protocol.cc (-3 / +15 lines)
 Lines 486-496    Link Here 
486
  NS_LOG_FUNCTION (this << i);
486
  NS_LOG_FUNCTION (this << i);
487
  Ptr<Ipv6Interface> interface = GetInterface (i);
487
  Ptr<Ipv6Interface> interface = GetInterface (i);
488
488
489
  interface->SetUp ();
489
  // RFC 2460, Section 5, pg. 24:
490
  //  IPv6 requires that every link in the internet have an MTU of 1280
491
  //  octets or greater.  On any link that cannot convey a 1280-octet
492
  //  packet in one piece, link-specific fragmentation and reassembly must
493
  //  be provided at a layer below IPv6.
494
  if (interface->GetDevice ()->GetMtu () >= 1280)
495
    {
496
      interface->SetUp ();
490
497
491
  if (m_routingProtocol != 0)
498
      if (m_routingProtocol != 0)
499
        {
500
          m_routingProtocol->NotifyInterfaceUp (i);
501
        }
502
    }
503
  else
492
    {
504
    {
493
      m_routingProtocol->NotifyInterfaceUp (i);
505
      NS_LOG_LOGIC ("Interface " << int(i) << " is set to be down for IPv6. Reason: not respecting minimum IPv6 MTU (1280 octects)");
494
    }
506
    }
495
}
507
}
496
508

Return to bug 1810