023-03-04 | 02:18:11 PM dilinger: singpolyma: K. Wanna fix that bug in master, then? Dino is sending an xml stanza for session-accept with (NS stuff removed for brevity): <{ice-udp:1}:transport {:ice-udp:1}:ufrag=‘puL2’ {:ice-udp:1}:pwd=‘9/n4a…’> <{:dtls:0}:fingerprint {:dtls:0}:hash=‘sha-256’ {:dtls:0}:setup=‘active’> EF:F1:2C…:0A:40:26:D7:92:78:4E </{:dtls:0}:fingerprint> [various other xml nodes] </{:ice-udp:1}:transport> . The function jingle_interpret_ice_udp_transport() in channels/chan_motif.c first calls iks_find_attrib(transport, “ufrag”), which searches the transport node for ufrag; that looks correct. Then later, iks_find_with_attrib(transport, “transport”, “xmlns”, DTLS_NS) searches the child nodes of transport for an xml tag name of “transport” and returns it. Then it looks for attributes that are in the fingerprint xml tag (ie, iks_find_attrib(fingerprint_node, “hash”); ). It should really be looking for the “fingerprint” tag, not “transport”.
2023-03-04 | 02:19:30 PM dilinger: singpolyma: Unless, of course, Dino is sending the wrong thing in that case. I don’t have debugging set up in another non-Dino client yet to see what they’re sending.
2023-03-04 | 02:23:18 PM singpolyma: Hmm, yeah, I think probably there is no tag named “transport” with namespace DTLS_NS so that does sound like maybe a bug of some kind
2023-03-04 | 03:15:15 PM dilinger: singpolyma: I’m also not convinced that psycotica0’s fix was correct. Rather than pulling in the fingerprint node and reading attributes from that, their fix (https://git.sr.ht/~psycotica0/asterisk/commit/a0316d474387129a079cd5eb6cf581f568b3b634) was to grab the (I think?) first child node of the transport
cherry picked https://git.singpolyma.net/asterisk/commit/9641a83a6b449bfa6271aef87a7a0ece6da0192e and https://git.singpolyma.net/asterisk/commit/8c27f4845651319e6edb07189f9454b5b970960a not sure why they never made it to master honestly