]> git.ipfire.org Git - thirdparty/asterisk.git/commit
tcptls: when disabling a server port, we should set the accept_fd to -1.
authorJaco Kroon <jaco@uls.co.za>
Fri, 2 Jun 2023 07:11:22 +0000 (09:11 +0200)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Mon, 12 Jun 2023 14:07:32 +0000 (14:07 +0000)
commit73326fb4e07e5b242e634c6e7b3197de9f04e09d
treed8c2d343fc03edf4a7e26b26975d8b00e0298b73
parent73c5967c2d130d0c4033684f76dad12d7d4d49e6
tcptls: when disabling a server port, we should set the accept_fd to -1.

If we don't set this to -1 if the structure can be potentially re-used
later then it's possible that we'll issue a close() on an unrelated file
descriptor, breaking asterisk in other interesting ways.

I believe this to be an unlikely scenario, but it costs nothing to be
safe.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
main/tcptls.c