[libnice] NiceAgentRecvFunc invoked for data no matter the source

Youness Alaoui kakaroto at kakaroto.homelinux.net
Thu Aug 21 15:22:07 PDT 2014


That's a feature, because while it's usually the same, sometimes your
selected pair may be different from the peer's selected pair. Or simply
because one interface was disconnected and the peer switched to a different
pair, etc.. If libnice receives data from a valid peer, it will send you
the data, it's normal. The 'selected pair' is mostly used for sending.
However, there is also a bug here, it is currently forwarding back to the
application any data it can't parse. It should only do it if the data came
from an already authenticated pair. I suggest you file a bug report about
this : https://bugs.freedesktop.org/enter_bug.cgi?product=Nice


On Thu, Aug 21, 2014 at 12:51 PM, Lorenzo Miniero <lminiero at gmail.com>

> Hi,
> 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 needed?
> Thanks,
> Lorenzo
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20140821/7b617c7d/attachment.html>

More information about the nice mailing list