A bug was found in EMANE 0.8.1 that will cause a stale pathloss value
and a stale propagation time to be used for receive processing within
the Universal PHY when a transmitting NEM's location changes but the
receiving NEM's location remains the same. These stale values will be
reported until the receiving NEM's location changes. At which time both
the pathloss and propagation time from the transmitting NEM to the
receiving NEM will be recalculated.
This bug affects *all* Universal PHY instances. Those instances
configured to use EMANE's built in propagation algorithms, those with
the 'pathlossmode' configuration parameter set to 'freespace' or '2ray',
will have *both* the stale pathloss and the stale propagation time
issue. Those Universal PHY instances with 'pathlossmode' set to
'pathloss' will *only* have the stale propagation time issue.
The attached patch fixes the stale pathloss and propagation time issues:
emane-0.8.1-universalphy_stalepathlosspropagation .patch (emane)
Since the release of 0.8.1 there have been a total of 3 patches (not
including this one):
* Set TTL for OTA and Event multicast channels (emane)
emane-0.8.1-ttl_ota_event_channels.patch
* Fix Comm Effect EEL event addressing (emanegeneel add-on)
emanegeneel-0.2.1-commeffectaddressing.patch
* Fix Comm Effect off-by-on loss percentage (emanecommeffect add-on)
emanecommeffect-0.5.1-loss_probability.patch
All 0.8.1 patches to date have been attached for your convenience.
--
Steven Galgano
Adjacent Link LLC
www.adjacentlink.com
Index: emane-0.8.1/models/universal/phylayer/pathlossmanager.cc
===================================================================
--- emane-0.8.1/models/universal/phylayer/pathlossmanager.cc (revision 75)
+++ emane-0.8.1/models/universal/phylayer/pathlossmanager.cc (working copy)
@@ -444,6 +444,12 @@
// if the entry is this NEM then all other entries are considered invalid
if(e[i].u16Node_ == id_)
{
+#ifdef VERBOSE_LOGGING
+ pPlatformService_->log(EMANE::DEBUG_LEVEL,
+ "PHYI %03hu PathLossManager::%s: our position changed, setting all position status to dirty",
+ id_, __func__);
+#endif
+
for(UniversalPHY::PathLossManager::PathLossPositionMapIter iter = pathLossPositionMap_.begin();
iter != pathLossPositionMap_.end(); ++iter)
{
@@ -451,6 +457,18 @@
iter->second.positionStatus_.bDirty_ = true;
}
}
+ else
+ {
+#ifdef VERBOSE_LOGGING
+ pPlatformService_->log(EMANE::DEBUG_LEVEL,
+ "PHYI %03hu PathLossManager::%s: nem %hu position changed, setting position status to dirty",
+ id_, __func__,
+ e[i].u16Node_);
+#endif
+
+ // set position dirty flag
+ result.first->second.positionStatus_.bDirty_ = true;
+ }
}
// same value
else
Index: src/libemane/eventservice.cc
===================================================================
--- src/libemane/eventservice.cc (revision 1)
+++ src/libemane/eventservice.cc (working copy)
@@ -342,6 +342,33 @@
}
}
+ if(eventGroupAddress_.get_type() == AF_INET)
+ {
+ if(mcast_.set_option(IP_MULTICAST_TTL,32) == -1)
+ {
+ std::stringstream ssDescription;
+ ssDescription
+ <<"unable to set EventService TTL IP_MULTICAST_TTL"
+ <<std::ends;
+ throw EventServiceException(ssDescription.str());
+ }
+ }
+ else if(eventGroupAddress_.get_type() == AF_INET6)
+ {
+ int iTTL = 32;
+
+ if(mcast_.ACE_SOCK::set_option(IPPROTO_IPV6,IPV6_MULTICAST_HOPS,
+ &iTTL,
+ sizeof(iTTL)) == -1)
+ {
+ std::stringstream ssDescription;
+ ssDescription
+ <<"unable to set EventService TTL IPV6_MULTICAST_TTL"
+ <<std::ends;
+ throw EventServiceException(ssDescription.str());
+ }
+ }
+
EMANEUtils::spawn(*this,
&EMANE::EventService::receiveEventMessage,
&receiveThread_,
Index: src/libemane/otamanager.cc
===================================================================
--- src/libemane/otamanager.cc (revision 1)
+++ src/libemane/otamanager.cc (working copy)
@@ -258,15 +258,26 @@
throw OTAException(sstream.str());
}
- if(otaGroupAddress.get_type() == AF_INET) {
+ if(otaGroupAddress.get_type() == AF_INET)
+ {
if(mcast_.set_option(IP_MULTICAST_LOOP,0) == -1)
{
std::stringstream ssDescription;
ssDescription<<"unable to unset OTA Manager group IP_MULTICAST_LOOP errno "<< ACE_OS::strerror (errno) << std::ends;
throw OTAException(ssDescription.str());
}
+
+ if(mcast_.set_option(IP_MULTICAST_TTL,32) == -1)
+ {
+ std::stringstream ssDescription;
+ ssDescription
+ <<"unable to set OTA Manager group IP_MULTICAST_TTL"
+ <<std::ends;
+ throw OTAException(ssDescription.str());
+ }
}
- else if(otaGroupAddress.get_type() == AF_INET6) {
+ else if(otaGroupAddress.get_type() == AF_INET6)
+ {
int loop = 0;
if(mcast_.ACE_SOCK::set_option(IPPROTO_IPV6,IPV6_MULTICAST_LOOP,&loop,sizeof(loop)) == -1)
{
@@ -274,6 +285,18 @@
ssDescription<<"unable to unset OTA Manager group IPV6_MULTICAST_LOOP errno " << ACE_OS::strerror (errno) << std::ends;
throw OTAException(ssDescription.str());
}
+
+ int iTTL = 32;
+ if(mcast_.ACE_SOCK::set_option(IPPROTO_IPV6,IPV6_MULTICAST_HOPS,
+ &iTTL,
+ sizeof(iTTL)) == -1)
+ {
+ std::stringstream ssDescription;
+ ssDescription
+ <<"unable to set OTA Manager group IPV6_MULTICAST_HOPS"
+ <<std::ends;
+ throw OTAException(ssDescription.str());
+ }
}
Index: emanegeneel/loaders/commeffect/eelloadercommeffect.cc
===================================================================
--- emanegeneel/loaders/commeffect/eelloadercommeffect.cc (revision 1)
+++ emanegeneel/loaders/commeffect/eelloadercommeffect.cc (working copy)
@@ -229,7 +229,7 @@
{
eventInfoList.push_back(EELEventInfo(0,
iter->first,
- EMANE::COMPONENT_PHYILAYER,
+ EMANE::COMPONENT_ALL,
CommEffectEvent::EVENT_ID,
CommEffectEvent(&cache[0],
cache.size()).getObjectState()));
Index: src/commeffectshim.cc
===================================================================
--- src/commeffectshim.cc (revision 83)
+++ src/commeffectshim.cc (working copy)
@@ -542,7 +542,7 @@
else if((loss > 0) && (loss < 100))
{
// if loss is less then random value
- if((ACE_OS::rand() % 100) > loss)
+ if((ACE_OS::rand() % 100) >= loss)
{
// add to count
count++;
_______________________________________________
emane-users mailing list
[email protected]
http://pf.itd.nrl.navy.mil/mailman/listinfo/emane-users