summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-06 15:12:28 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-06 15:12:28 -0800
commit5e6a4e5f5e0022dccbc2f6cf8a8b38c038720866 (patch)
treed4db86aba95df3108b78f59f807e5f9e59456324 /node/Node.cpp
parent66dfc33de91577012bb0e9ec22d2ef6bf18805ef (diff)
downloadinfinitytier-5e6a4e5f5e0022dccbc2f6cf8a8b38c038720866.tar.gz
infinitytier-5e6a4e5f5e0022dccbc2f6cf8a8b38c038720866.zip
Send revocations automatically on deauth for instant kill, also fix some issues with the RP.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index a75a56b4..1125ca7a 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -774,6 +774,24 @@ void Node::ncSendConfig(uint64_t nwid,uint64_t requestPacketId,const Address &de
}
}
+void Node::ncSendRevocation(const Address &destination,const Revocation &rev)
+{
+ if (destination == RR->identity.address()) {
+ SharedPtr<Network> n(network(rev.networkId()));
+ if (!n) return;
+ n->addCredential(RR->identity.address(),rev);
+ } else {
+ Packet outp(destination,RR->identity.address(),Packet::VERB_NETWORK_CREDENTIALS);
+ outp.append((uint8_t)0x00);
+ outp.append((uint16_t)0);
+ outp.append((uint16_t)0);
+ outp.append((uint16_t)1);
+ rev.serialize(outp);
+ outp.append((uint16_t)0);
+ RR->sw->send(outp,true);
+ }
+}
+
void Node::ncSendError(uint64_t nwid,uint64_t requestPacketId,const Address &destination,NetworkController::ErrorCode errorCode)
{
if (destination == RR->identity.address()) {