diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-06-20 16:04:53 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-06-20 16:04:53 -0700 |
commit | 4c3fb8cf1085e76c4d7ff9d442b4f74ba306a4bc (patch) | |
tree | 03b234bbd18d0490b005496324008275414034dd | |
parent | c3cea554934f30abeea9b219a41215c5f2bfa41e (diff) | |
download | infinitytier-4c3fb8cf1085e76c4d7ff9d442b4f74ba306a4bc.tar.gz infinitytier-4c3fb8cf1085e76c4d7ff9d442b4f74ba306a4bc.zip |
Don't list node as an active bridge if it's not authorized. (Wouldn't work anyway.)
-rw-r--r-- | netconf-service/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/netconf-service/index.js b/netconf-service/index.js index a55b844d..da386db7 100644 --- a/netconf-service/index.js +++ b/netconf-service/index.js @@ -473,7 +473,11 @@ function doNetconfRequest(message) if (keys) { async.eachSeries(keys,function(key,nextKey) { DB.hgetall(key,function(err,abr) { - if ((abr)&&(abr.id)&&(abr.id.length === 10)&&(ztDbTrue(abr['activeBridge']))) { + if ( (abr) && + (abr.id) && + (abr.id.length === 10) && + ( (!ztDbTrue(network['private'])) || ztDbTrue(abr['authorized']) ) && + (ztDbTrue(abr['activeBridge'])) ) { if (activeBridges.length) activeBridges += ','; activeBridges += abr.id; |