• Jakub Adam's avatar
    agent: fix relay candidate discovery on hosts having several IPs · ed75d55c
    Jakub Adam authored
    When a message is received from a TURN server and we manage to find a
    local relay candidate with matching stream and component IDs, we should
    also check whether the message came from the candidate's respective
    socket.
    
    We should do this because there might still be some pending TURN
    candidate discovery with the same server from a different local host IP
    and the message may be a response to our allocate request. If
    nice_udp_turn_socket_parse_recv_message() is passed such request, it can
    make some wrong assumptions and modify it like in the case of reliable
    UDP-TURN-OVER-TCP by removing (supposed) RFC4571 framing, which in turn
    causes the reply to be unrecognized and discarded.
    
    Because of this, any subsequent replies following the first successful
    allocate response from that server couldn't create any additional relay
    candidates.
    
    Maniphest Tasks: https://phabricator.freedesktop.org/T7336Reviewed-by: default avatarOlivier Crête <olivier.crete@collabora.com>
    Differential Revision: https://phabricator.freedesktop.org/D786
    ed75d55c
agent.c 185 KB