• Fabrice Bellet's avatar
    stun: fix ice role conflict handling · acdc0b8b
    Fabrice Bellet authored
    This patch fixes the role conflict handling in stun ICE usage,
    according to RFC 5245, by adding including missing cases in the
    test. The role switch not only depends of the comparison of the
    stun ice-controlling/controlled attrib with the agent tie breaker
    value, but it also depends on the current role of the agent.
    
    This patch also changes the value returned by
    stun_usage_ice_conncheck_create_reply() when a role conflict exists
    but doesn't change the role of the agent, causing an error stun
    response. Previously, this case could not be differenciated by the
    caller from a case with no role conflict. Now by examinating the
    return value, and whether the control param changed, the caller
    can check the four possibles situations. The stun test suite is
    updated to match this change.
    
    Differential Revision: https://phabricator.freedesktop.org/D873
    acdc0b8b
test-conncheck.c 12 KB