fix(towercore): preserve completed handover checks
- block context export only while handover is pending - avoid disconnecting legitimate post-abort checker flow
This commit is contained in:
1 parent
3ef348ab10
commit
9a3a65535a
2 files changed
+12
-47
No files matched your search
@@ -77,26 +77,6 @@ class GuardTests(unittest.TestCase):
|
||||
self.assertFalse(guard.should_block(frame(0x41, [(0x15, b"\x01\0\0\0")])))
|
||||
self.assertFalse(guard.should_block(frame(0x23, [(0x0B, selector)])))
|
||||
|
||||
def test_blocks_export_for_another_subscriber(self) -> None:
|
||||
module = importlib.import_module("guard")
|
||||
guard = module.ConnectionGuard()
|
||||
guard.observe_server(frame(0x04, [(0x09, b"\x11\x22\x33\x44")]))
|
||||
self.assertTrue(guard.should_block(frame(0x23, [(0x0B, b"\x55\x66\x77\x88" + b"\0" * 4)])))
|
||||
|
||||
def test_allows_export_for_attached_subscriber(self) -> None:
|
||||
module = importlib.import_module("guard")
|
||||
guard = module.ConnectionGuard()
|
||||
own_tmsi = b"\x11\x22\x33\x44"
|
||||
guard.observe_server(frame(0x04, [(0x09, own_tmsi)]))
|
||||
self.assertFalse(guard.should_block(frame(0x23, [(0x0B, own_tmsi + b"\0" * 4)])))
|
||||
|
||||
def test_updates_subscriber_after_handover_commit(self) -> None:
|
||||
module = importlib.import_module("guard")
|
||||
guard = module.ConnectionGuard()
|
||||
guard.observe_server(frame(0x04, [(0x09, b"\x11\x22\x33\x44")]))
|
||||
new_tmsi = b"\x55\x66\x77\x88"
|
||||
guard.observe_server(frame(0x41, [(0x09, new_tmsi)]))
|
||||
self.assertFalse(guard.should_block(frame(0x23, [(0x0B, new_tmsi + b"\0" * 4)])))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user