[libnice] NiceAgentRecvFunc invoked for data no matter the source

Lorenzo Miniero lminiero at gmail.com
Thu Aug 21 09:51:06 PDT 2014


I don't know if this is a known bug or feature, as I couldn't find any
reference in the documentation, so I'll try and ask here.

I noticed that, after a successful ICE setup using libnice, apparently
the NiceAgentRecvFunc callback I set is invoked for a specific component
even when data is not coming from the peer candidate that was selected. To
make a practical and reproduceable exampe, I tried setting up a media
session and, after a successful ICE setup, I used the nc command to send
data to the port my application had selected. Surprisingly, the callback
was notified, and the data was available, while I expected the library to
ignore this external data as it was not part of the "connection"
established between the two parties. Again, not sure if it's a bug or a
feature, but in my case it's pretty awkward as I have no way to understand
whether the message came from who I meant or not.

Is there any way to force libnice to do this kind of filtering and actually
enforce the "connection" that was negotiated? or, as an alternative, can I
"resolve" the "sender" somehow and do this at an application level, if

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20140821/7b96fdfd/attachment.html>

More information about the nice mailing list