[asterisk-bugs] [JIRA] (ASTERISK-27406) Infinite loop when out of ports and rtpstart value is odd
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Sep 14 10:30:12 CDT 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-27406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-27406:
-------------------------------------
Target Release Version/s: 20.0.0
> Infinite loop when out of ports and rtpstart value is odd
> ---------------------------------------------------------
>
> Key: ASTERISK-27406
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27406
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_rtp_asterisk
> Affects Versions: 13.18.0
> Reporter: Thomas Guebels
> Assignee: Michael Bradeen
> Severity: Trivial
> Labels: patch
> Target Release: 16.24.0, 18.10.0, 19.2.0, 20.0.0
>
> Attachments: round_up_to_even.diff
>
>
> When the rtpstart value configured in rtp.conf parity is odd and all RTP ports are already used, the next call will start an infinite loop.
> ast_rtp_new walks through the RTP port range configured until it finds a free one. It starts at a random position, wraps around at the end of the range and return an error if it comes back to the starting position.
> Unfortunately, this code assumes an even value was set in rtpstart since we never go back to the starting position otherwise.
> Either a correct value for rtpstart should be enforced when parsing the configuration or the port lookup should not assume anything and never fail to break the loop.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list