From b3073f44a2180b2a888ae8615d6112bbd82ef3da Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Thu, 21 Jul 2016 23:02:54 +0200 Subject: move sourceAddress out of scope sourceAddress is used in the catch block --- node/IncomingPacket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node') diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 231f0d06..37af8425 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -42,9 +42,9 @@ namespace ZeroTier { bool IncomingPacket::tryDecode(const RuntimeEnvironment *RR,bool deferred) { - try { - const Address sourceAddress(source()); + const Address sourceAddress(source()); + try { // Check for trusted paths or unencrypted HELLOs (HELLO is the only packet sent in the clear) const unsigned int c = cipher(); bool trusted = false; -- cgit v1.2.3 From f21af60a136940b4da6823cb6b34e2368662c37c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 21 Jul 2016 19:05:14 -0700 Subject: Init trusted path count to zero. Meh. --- node/Topology.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'node') diff --git a/node/Topology.cpp b/node/Topology.cpp index 4105eae9..6e96f2eb 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -44,6 +44,7 @@ static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {0x01,0x0 Topology::Topology(const RuntimeEnvironment *renv) : RR(renv), + _trustedPathCount(0), _amRoot(false) { std::string alls(RR->node->dataStoreGet("peers.save")); -- cgit v1.2.3