log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
authorHajime Tazaki <tazaki@sfc.wide.ad.jp>
Wed, 03 Jul 2013 15:46:49 +0200
changeset 9888 ba0cc8987365
parent 9887 0bc66b10f3dd
child 9889 727fce98f147
log msg instead of fail when non-IPv4 pkt is sent over LteUeNetDevice
src/lte/model/lte-ue-net-device.cc
--- a/src/lte/model/lte-ue-net-device.cc	Tue Jul 02 23:08:26 2013 +0200
+++ b/src/lte/model/lte-ue-net-device.cc	Wed Jul 03 15:46:49 2013 +0200
@@ -200,8 +200,11 @@
 LteUeNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
 {
   NS_LOG_FUNCTION (this << dest << protocolNumber);
-  NS_ASSERT_MSG (protocolNumber == Ipv4L3Protocol::PROT_NUMBER, "unsupported protocol " << protocolNumber << ", only IPv4 is supported");
-  
+  if (protocolNumber != Ipv4L3Protocol::PROT_NUMBER)
+    {
+      NS_LOG_INFO("unsupported protocol " << protocolNumber << ", only IPv4 is supported");
+      return true;
+    }  
   return m_nas->Send (packet);
 }