Skip to content

Skip hostname parsing for stun servers #2125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 16, 2025

Conversation

sirknightj
Copy link
Contributor

Issue #, if available:

  • N/A

What was changed?

  • Skip the hostname parsing optimization for the STUN server

Why was it changed?

  • As an optimization (to skip the getaddrinfo call), we can parse the URL of the TURN servers. However, the STUN server doesn't have the IP address in the URL that we can extract.
  • This causes a useless warning log to get printed every time (example):
2025-05-02 14:54:05.947 INFO    getIpWithHostName(): ICE SERVER Hostname received: stun.kinesisvideo.***.amazonaws.com
2025-05-02 14:54:05.947 WARN    getIpAddrFromDnsHostname(): Received unexpected hostname format: stun.kinesisvideo.***.amazonaws.com
2025-05-02 14:54:05.947 WARN    getIpWithHostName(): Parsing for address failed for stun.kinesisvideo.***.amazonaws.com, fallback to getaddrinfo
2025-05-02 14:54:05.961 PROFILE parseIceServer(): ICE Server address for stun.kinesisvideo.***.amazonaws.com: 54.200.157.178

How was it changed?

  • Don't attempt parsing the ICE server if the hostname starts with stun..
  • Don't print that log that the hostname failed to parse, if it the hostname starts with stun..

What testing was done for the changes?

  • Ran it locally and confirmed the log is no longer there.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sirknightj sirknightj added bug Something isn't working v1.12.1 labels May 6, 2025
@sirknightj sirknightj added v1.13.0 and removed v1.12.1 labels May 6, 2025
stefankiesz
stefankiesz previously approved these changes May 7, 2025
@sirknightj sirknightj force-pushed the skip-stunserver-hostname-parsing branch from af902cf to dccd241 Compare May 7, 2025 22:46
@sirknightj sirknightj changed the base branch from release-v1.12.1 to develop May 7, 2025 22:46
@sirknightj sirknightj dismissed stefankiesz’s stale review May 7, 2025 22:46

The base branch was changed.

@sirknightj sirknightj requested a review from stefankiesz May 7, 2025 22:50
@sirknightj sirknightj merged commit 99de656 into develop May 16, 2025
75 checks passed
@sirknightj sirknightj deleted the skip-stunserver-hostname-parsing branch May 16, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants