fix: Filter out 1-byte keepalive packets from Columba Android peers
Add filtering for Android Columba's 15-second keepalive packets to prevent unnecessary processing. Keepalive packets are 1 byte (0x00) and should be ignored by the BLE interface. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8cd54443c8
commit
f759af46e7
1 changed files with 12 additions and 0 deletions
|
|
@ -1413,6 +1413,12 @@ class BLEInterface(Interface):
|
|||
"""
|
||||
RNS.log(f"{self} received {len(data)} bytes from peer {peer_address}", RNS.LOG_EXTREME)
|
||||
|
||||
# Filter 1-byte keep-alive packets from Columba (Android) peers
|
||||
# Columba sends 0x00 every 15 seconds to prevent Android BLE supervision timeout
|
||||
if len(data) == 1 and data[0] == 0x00:
|
||||
RNS.log(f"{self} received keep-alive from peer {peer_address}, ignoring", RNS.LOG_EXTREME)
|
||||
return
|
||||
|
||||
# Look up peer identity to compute fragmenter key
|
||||
peer_identity = self.address_to_identity.get(peer_address)
|
||||
if not peer_identity:
|
||||
|
|
@ -1496,6 +1502,12 @@ class BLEInterface(Interface):
|
|||
"""
|
||||
RNS.log(f"{self} received {len(data)} bytes from central {sender_address}", RNS.LOG_EXTREME)
|
||||
|
||||
# Filter 1-byte keep-alive packets from Columba (Android) peers
|
||||
# Columba sends 0x00 every 15 seconds to prevent Android BLE supervision timeout
|
||||
if len(data) == 1 and data[0] == 0x00:
|
||||
RNS.log(f"{self} received keep-alive from central {sender_address}, ignoring", RNS.LOG_EXTREME)
|
||||
return
|
||||
|
||||
# Check if we have peer identity
|
||||
peer_identity = self.address_to_identity.get(sender_address)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue