diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-07 11:17:38 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-07 11:17:38 -0700 |
| commit | 683254a0dbd208ed1570d36275e5164b2a8885ad (patch) | |
| tree | f17f7ef0967ac384a3d3b27d15e89f7de7651c54 /controller/SqliteNetworkController.cpp | |
| parent | 2885aea65c0ad6d8337b7e3ae4f2e6099f3eedda (diff) | |
| download | infinitytier-683254a0dbd208ed1570d36275e5164b2a8885ad.tar.gz infinitytier-683254a0dbd208ed1570d36275e5164b2a8885ad.zip | |
Don't bother signing if we are not using the legacy netconf.
Diffstat (limited to 'controller/SqliteNetworkController.cpp')
| -rw-r--r-- | controller/SqliteNetworkController.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index a83807ca..799b30f8 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -2130,15 +2130,14 @@ NetworkController::ResultCode SqliteNetworkController::_doNetworkConfigRequest(c } } - if (!legacy.sign(signingId,now)) { - return NETCONF_QUERY_INTERNAL_SERVER_ERROR; - } - // Append legacy network config data for older devices if (metaData.protocolVersion < 6) { + if (!legacy.sign(signingId,now)) + return NETCONF_QUERY_INTERNAL_SERVER_ERROR; std::string legacyStr(legacy.toString()); netconf.append((const void *)legacyStr.data(),(unsigned int)legacyStr.length()); } + netconf.append((uint8_t)0); // Append new format data for newer devices |
