Hi,
I've pushed the following to the brolley/dev branch in the pcpfans
repository;
Registered avahi services must each have a unique name on the local
network. If there is a collision, a callback is made, giving the
opportunity to rename the service and try again. Avahi provides an API
function for generating a new name based on the existing one, however,
the algorithm is simple and it is conceivable that the service name
namespace could be maliciously flooded with service names designed to
maximize collisions.
This change puts a limit on the number of collision resolution attempts.
There are two classes of collisions: local (on the same host) and remote
(on another host on the network). For the first, the collisions are
resolved in a loop. At first, I believed that the second class caused
recursive callbacks and would therefore require more limiting than the
first. However, I have confirmed that, while the second class does cause
repeated callbacks, they are not recursive.
Implementing the check in renameService(), catches both classes of
collisions. The limit of 65535 was suggested by fche as it is the number
of TCP ports.
Dave
-------------------------------------
commit 8301d0d2ee1a83302f66701847009f0dfa5a02e8
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed Dec 11 12:23:56 2013 -0500
Limit the number of collision resolution attempts for Avahi services.
|