Skip to content

Commit 1979cb6

Browse files
committed
Merge pull request arduino#77 from fallberg/sign-hotfix
Bugfix for gateway signing requirements
2 parents fb1c542 + 2ab9822 commit 1979cb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/MySensors/MySensor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ boolean MySensor::process() {
402402
// We do not currently want a gateway to require signing from all nodes in a network just because it wants one node
403403
// to sign it's messages
404404
if (isGateway) {
405-
if (requireSigning)
406-
sendRoute(build(msg, nc.nodeId, msg.sender, NODE_SENSOR_ID, C_INTERNAL, I_REQUEST_SIGNING, false).set(requireSigning));
405+
if (requireSigning && DO_SIGN(msg.sender))
406+
sendRoute(build(msg, nc.nodeId, msg.sender, NODE_SENSOR_ID, C_INTERNAL, I_REQUEST_SIGNING, false).set(true));
407407
else
408408
sendRoute(build(msg, nc.nodeId, msg.sender, NODE_SENSOR_ID, C_INTERNAL, I_REQUEST_SIGNING, false).set(false));
409409
}

0 commit comments

Comments
 (0)