Open sipsorcery opened 4 years ago
Thanks for the report @sipsorcery ! I will check this out this weekend.
I haven't put any time myself in getting IPv6 working. Will drop an estimate or a PR if things go really well :)
a=candidate:2441 1 udp 659136 fe80::54a9:d238:b2ee:ceb%21 60720 typ host generation 0
That's a link-local IPv6 address with an interface identifier. The interface identifier is local to the sending host, and therefore doesn't make any sense in this context. It is not legal according to the grammar given in Section 15.1 of RFC 5245 (which ultimately refers to the IP6-address production in Section 9 of RFC 4566).
@Sean-Der, it's a matter of opinion, but I think that in the interest of robustness Pion should ignore malformed candidate lines rather than failing the whole SDP.
Pion should ignore malformed candidate lines rather than failing the whole SDP.
An alternative would be to snip the zone ID
prefix off the IPv6 address.
RFC 4007: IPv6 Scoped Address Architecture, which deals with the zone ID
(Windows) or scope ID
(Linux), does indicate it can be ignored if not understood.
Pion should ignore malformed candidate lines rather than failing the whole SDP.
An alternative would be to snip the zone ID prefix off the IPv6 address.
That's not going to work with link-locals: a link-local is not usable without the scope identifier (you get EINVAL from send/connect).
RFC 4007: IPv6 Scoped Address Architecture, which deals with the zone ID (Windows) or scope ID (Linux), does indicate it can be ignored if not understood.
Site-local is obsolete for unicast (RFC 3879), so the only unicast scoped addresses left are link-local, which don't work without the scope identifier. So it's not going to do you any good.
That's not going to work with link-locals: a link-local is not usable without the scope identifier (you get EINVAL from send/connect).
On Windows 10 connection attempts to IPv6 link local addresses work fine.
The telnet connection attempt from a Windows 10 machine to an Ubuntu machine works.
> telnet fe80::bcc:137b:3bc1:b926 8081
Ubuntu running:
nc -6 -l 8081
On Ubuntu the IPv6 link local addresses don't seem very usable to be even able to ping the local address on the machine the interface name is required. And I wasn't able to find any permutation where Ubuntu could ping a Windows link local address.
ping -6 fe80::bcc:137b:3bc1:b926%eno1
So I guess in short the IPv6 link local address ICE candidates are useful on Windows and not so much on Linux. Supporting them is probably not that critical in either case.
On Windows 10 connection attempts to IPv6 link local addresses work fine.
Interesting.
However, I think we can agree that the SDP initially in this bug report is malformed.
Probably related to 2699584e9a5b818dec5594a06925170c63dbfa25 and 6160e8033fc0e3a9cf63c21f393edcd896521d50.
Your environment.
go get github.com/pion/webrtc/v3
today (13th of Jul 2020).What did you do?
Attempted to run the data-channels example using:
echo <sdp offer> | go run main.go
What happened?
The deserialised SDP is as below. If the ICE candidate with the IPv6 line is removed then the error does not occur.
A separate related issue is the SDP answer received from the
data-channels
example isn't setting the ICE candidate's `foundation value. An example SDP answer is below:Deserialised: