netbirdio / netbird

Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
9.83k stars 425 forks source link

Process routes before peers #2105

Closed lixmal closed 2 weeks ago

lixmal commented 4 weeks ago

Describe your changes

We need to discard candidates thare are routed through any of our received routes (minus default route). The existing approach to discard candidates when received in onCandidate doesn't catch prflx ones. Hence we block candidates directly in the muxerconn's WriteTo method.

Additonally this PR ensures we have routes present before deciding to discard ICE candidates that might be routed to other peers.

Issue ticket number and link

Checklist

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
6 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud