tunmap: ensure assigned chain_id is unused

When handing out a chain_id, make sure it is not in use yet.

So far picking a chain_id was of PoC grade quality. As osmo-upf is
approaching production grade, make this waterproof.

So far with inefficient iteration of all sessions; faster lookup follows
in I36a75ec4698cd83558185c1f202400eb53ae8ff6.

Related: OS#5900
Change-Id: I139b46de0bd15185a7a06109d55f7c759755ec81
This commit is contained in:
Neels Janosch Hofmeyr
2023-02-09 01:26:48 +01:00
committed by neels
parent 27a90869c7
commit 40a30fce4a
5 changed files with 123 additions and 71 deletions

View File

@@ -141,3 +141,4 @@ int upf_gtp_devs_open();
void upf_gtp_devs_close();
uint32_t upf_next_local_teid(void);
uint32_t upf_next_chain_id(void);