Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agent: Fix min_range in get_free_tcp_port()
get_free_tcp_port() effectively ignored the min_range parameter by using min(1, min_range). This meant that min_range was always 1 (unless a negative value was passed). As ports lower than 1024 are privileged on Linux, this lead to the agent trying to bind to ports that it did not have permission to. By using max(1, min_range), We insure that min_range is always at least 1, but will still use the provided parameter (1024 by default).
- Loading branch information