Don't send acks to ignored senders.
This commit is contained in:
parent
ec87aa6d81
commit
f455918326
|
@ -1,4 +1,5 @@
|
||||||
doTimingAttackMitigation = True
|
doTimingAttackMitigation = True
|
||||||
|
sendAckEvenIfMsgIgnored = False
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
|
@ -1050,6 +1051,12 @@ class receiveDataThread(threading.Thread):
|
||||||
toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdata)))
|
toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdata)))
|
||||||
shared.workerQueue.put(('sendbroadcast', ''))
|
shared.workerQueue.put(('sendbroadcast', ''))
|
||||||
|
|
||||||
|
if self.isAckDataValid(ackData):
|
||||||
|
print 'ackData is valid. Will process it.'
|
||||||
|
self.ackDataThatWeHaveYetToSend.append(
|
||||||
|
ackData) # When we have processed all data, the processData function will pop the ackData out and process it as if it is a message received from our peer.
|
||||||
|
else: # BlockMsg is true
|
||||||
|
if sendAckEvenIfMsgIgnored:
|
||||||
if self.isAckDataValid(ackData):
|
if self.isAckDataValid(ackData):
|
||||||
print 'ackData is valid. Will process it.'
|
print 'ackData is valid. Will process it.'
|
||||||
self.ackDataThatWeHaveYetToSend.append(
|
self.ackDataThatWeHaveYetToSend.append(
|
||||||
|
|
Reference in New Issue
Block a user