]> 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)
committerwe should set the accept_fd to -1 <Jaco Kroon|jaco@uls.co.za|>
Mon, 12 Jun 2023 14:07:25 +0000 (14:07 +0000)
commit4a637d6d11cb5d7cb98b2ee27a991e2d2eca79c2
treef525d6d507ed6e25a79aef72ce37f60122c864bf
parent8e3f9dcc7b6ff4627037e5c30ec4d33c0b3f7fef
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