summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/Network.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index 3e428ac2..299c4a6d 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -325,7 +325,10 @@ public:
const_iterator mcb(find("mcb"));
if (mcb == end())
return ZT_MULTICAST_DEFAULT_PROPAGATION_BREADTH;
- return Utils::hexStrToUInt(mcb->second.c_str());
+ unsigned int mcb2 = Utils::hexStrToUInt(mcb->second.c_str());
+ if (mcb2)
+ return mcb2;
+ return ZT_MULTICAST_DEFAULT_PROPAGATION_BREADTH;
}
/**
@@ -336,7 +339,10 @@ public:
const_iterator mcd(find("mcd"));
if (mcd == end())
return ZT_MULTICAST_DEFAULT_PROPAGATION_DEPTH;
- return Utils::hexStrToUInt(mcd->second.c_str());
+ unsigned int mcd2 = Utils::hexStrToUInt(mcd->second.c_str());
+ if (mcd2)
+ return mcd2;
+ return ZT_MULTICAST_DEFAULT_PROPAGATION_DEPTH;
}
/**