diff options
author | 2022-01-31 11:33:37 +0100 | |
---|---|---|
committer | 2022-01-31 11:53:39 +0100 | |
commit | b9aa34d5f77ac5969ad273bfd187ce5f9594b25e (patch) | |
tree | fd87cf2331ce8008128e1f29c565e9381f2fb440 /LICENSE | |
parent | 000215c229d6df2c1a68b50847d8c7abf3842ce5 (diff) |
connection: prevent channel ID overlap
When creating a new channel and the channel ID wraps around, make sure
to not re-use a channel ID that is still in use. Re-using the channel
ID usually means that the connection health check will stop working and
other things might break as well.
Also rename maxChannelID to nextChannelID and use a lock to guard access
instead of using an atomic. The lock does anyway need to be acquired
because to put the entry in the map.
This commit was inspired by the following PR on Github:
https://github.com/FDio/govpp/pull/14.
Change-Id: I8c1a4ca63a53d07a6482b6047a3005065168c0b4
Signed-off-by: Lukas Vogel <vogel@anapaya.net>
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions