Open Bug 2047344 Opened 5 months ago Updated 5 months ago

WebRTC ICE gather aborts on hosts without an IPv6 default route — nicer's default-address probe hits ENETUNREACH on IPv6, never falls back to IPv4 (UDPSocketParent.cpp:248 "Internal error")

Categories

(Core :: WebRTC: Networking, defect, P3)

Firefox 151
defect

Tracking

()

UNCONFIRMED

People

(Reporter: git, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36

Steps to reproduce:

  1. Linux host with IPv4 but no IPv6 default route. Verify:
    $ ip -4 route show default
    default via 192.168.1.1 dev wlp3s0f0 ...
    $ ip -6 route show default
    (empty)
    
  2. Firefox 150 Nightly (bundled with @playwright/test 1.60.0) or Firefox 151.0.2 release — both reproduce.
  3. Open any page that constructs an RTCPeerConnection (e.g. https://webrtc.github.io/samples/src/content/peerconnection/pc1/) and click Start → Call.
  4. Watch about:webrtc or DevTools console.

Minimal HTML reproducer:

<!doctype html>
<script>
  const pc = new RTCPeerConnection({
    iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],
  });
  pc.createDataChannel('x');
  pc.onicecandidate = e => console.log('candidate', e.candidate);
  pc.oniceconnectionstatechange = () => console.log('iceState', pc.iceConnectionState);
  pc.createOffer().then(o => pc.setLocalDescription(o));
</script>

Actual results:

Zero ICE candidates. iceConnectionState jumps to failed. Console: WebRTC: ICE failed, add a TURN server ….

Expected results:

pc.onicecandidate fires with at least one IPv4 host candidate (this host has a working IPv4 default route via 192.168.1.115/24); ICE proceeds to checking and connects if the remote peer is reachable.

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC: Networking
Product: Firefox → Core

Hmm, if you're hitting an error in UDPSocketParent, that means you're not running with the socket process enabled, but you're on Linux. That's not officially a supported configuration, but still it seems like a bug we should fix. That said, the default interface probing happens in nr_ice_get_default_local_address, and no callsite errors out due solely to an error from that:

This is where we handle the case where the default local address is set, which should always be the case:
https://searchfox.org/firefox-main/source/dom/media/webrtc/transport/third_party/nICEr/src/ice/ice_ctx.cpp#754

This is where we handle the situation where we don't already have a default local address:
https://searchfox.org/firefox-main/source/dom/media/webrtc/transport/third_party/nICEr/src/ice/ice_ctx.cpp#775
https://searchfox.org/firefox-main/source/dom/media/webrtc/transport/third_party/nICEr/src/ice/ice_ctx.cpp#779

Maybe something is going wrong in here? https://searchfox.org/firefox-main/source/dom/media/webrtc/jsapi/PeerConnectionImpl.cpp#4648

Severity: -- → S3
Priority: -- → P3

There's a chance that a copy of about:webrtc would be helpful here, could you attach that?

Thanks for looking into this, I'll grab the output when I am back at my station.

You need to log in before you can comment on or make changes to this bug.