Skip to content

Conversation

@N1cOs
Copy link
Contributor

@N1cOs N1cOs commented Nov 26, 2024

Description

Pass ipv6 zone param to net.ListenUDP. Also checked that it's specified in all other calls of net.ListenUDP. Tested it locally with ipv6 link-local and global unicast addresses.

However, should I add a unit test for that @Sean-Der? I could add it in the gather_test.go, but it would be host specific and require an assigned ipv6 address.

Also don't forget to backport to v3, because ipv6 link-local addresses appeared in v3.

Reference issue

Fixes #742

@codecov
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.63%. Comparing base (2c699d8) to head (566058b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #744      +/-   ##
==========================================
+ Coverage   78.61%   78.63%   +0.02%     
==========================================
  Files          41       41              
  Lines        4764     4769       +5     
==========================================
+ Hits         3745     3750       +5     
  Misses        785      785              
  Partials      234      234              
Flag Coverage Δ
go 78.63% <100.00%> (+0.02%) ⬆️
wasm ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

listenUDPInPortRange wasn't passing the Zone and would always fail to
bind. This would cause high CPU usage as every port in the range would
be attempted and fail.

Fixes pion#742
@Sean-Der Sean-Der force-pushed the fix/use-ipv6-zone-for-link-local-addrs branch from d3aef08 to 566058b Compare November 26, 2024 15:27
@Sean-Der
Copy link
Member

Fantastic! Thank you for fixing this @N1cOs

@Sean-Der Sean-Der merged commit 1c850ea into pion:master Nov 26, 2024
12 checks passed
@Sean-Der
Copy link
Member

@N1cOs Can you try pion/webrtc/[email protected] now?

@N1cOs
Copy link
Contributor Author

N1cOs commented Nov 27, 2024

I will check in a few days, but on v4.0.2 ignoring link-local addresses definitely fixes the high CPU consumption on connection initiation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ipv6: trying to listen on link-local addresses without interface

2 participants