mirror of
https://github.com/open5gs/open5gs.git
synced 2026-10-19 09:44:04 +00:00
A gNB/eNB can register the same node ID on a new SCTP association before the old association's shutdown is processed. Removing the old context can then delete the replacement's ID mapping. This caused the macOS N2 handover test to hang: the AMF could not find the target gNB despite its successful NG Setup, while the test waited for a Handover Request. Owner-checked removal alone is insufficient. ogs_hash_set() replaces only the value of an existing entry, retaining the key pointer into the old context. Subsequent ID reassignment or pool reuse can therefore break lookups even when the replacement's mapping is not deleted. Add ogs_hash_set_rekey() to remove and reinsert an entry with the supplied key pointer, leaving ordinary ogs_hash_set() semantics intact. Use it for gNB-ID and eNB-ID registration, and use the existing ogs_hash_unset_if_owner() when removing contexts or unindexing their previous IDs before reassignment. Document why both operations are needed and the caller's responsibility for key lifetime and access serialization. Keep the existing ID replacement policy and association lifetime unchanged. Add core and AMF/MME regression tests covering key replacement, displaced-owner cleanup, old key storage changes, ID reassignment, repeated registration and ID 0. |
||
|---|---|---|
| .. | ||
| abts-main.c | ||
| conv-test.c | ||
| fsm-test.c | ||
| hash-test.c | ||
| list-test.c | ||
| log-test.c | ||
| memory-test.c | ||
| meson.build | ||
| pkbuf-test.c | ||
| poll-test.c | ||
| pool-test.c | ||
| queue-test.c | ||
| rbtree-test.c | ||
| socket-test.c | ||
| strings-test.c | ||
| thread-test.c | ||
| time-test.c | ||
| timer-test.c | ||
| tlv-test.c | ||
| uuid-test.c | ||