瀏覽代碼

Fix potential bug in controller config request.

Adam Ierymenko 10 年之前
父節點
當前提交
07ea4fd4f9
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      node/Network.cpp
  2. 2 1
      node/Switch.hpp

+ 1 - 1
node/Network.cpp

@@ -264,7 +264,7 @@ void Network::requestConfiguration()
 			outp.append((uint64_t)_config->revision());
 		else outp.append((uint64_t)0);
 	}
-	RR->sw->send(outp,true,_id);
+	RR->sw->send(outp,true,0);
 }
 
 bool Network::validateAndAddMembershipCertificate(const CertificateOfMembership &cert)

+ 2 - 1
node/Switch.hpp

@@ -110,7 +110,8 @@ public:
 	 * won't be encrypted right. (This is not used for relaying.)
 	 *
 	 * The network ID should only be specified for frames and other actual
-	 * network traffic.
+	 * network traffic. Other traffic such as controller requests and regular
+	 * protocol messages should specify zero.
 	 * 
 	 * @param packet Packet to send
 	 * @param encrypt Encrypt packet payload? (always true except for HELLO)