GSoC/GCI Archive
Google Summer of Code 2012 freifunk

Improve the OLSRd mDNS plug-in

by Halino for freifunk

The OLSRd mDNS plug-in allows the distribution of mDNS (multicast DNS i.e. avahi/bonjour/zeroconf) messages over an OLSR network. This is substantially achieved by sniffing for mDNS packets on the final users' networks (usually HNA networks), encapsulating them inside OLSR protocol messages, exploiting OLSR native message transfer mechanisms, and decapsulating the mDNS packets at all the other end users' networks. The plug-in has been developed by members, however we would like to address some important issues that have arised during deployment: loops. If two mDNS plug-in enabled OLSR routers are attached to the same HNA network, then mDNS packets will loop back and forth between the two, also flooding the whole OLSR network. For the moment the temporary solution to this problem is to enable the plug-in on one router at a time on the same HNA. A real solution to the problem would be the following: usually mDNS packets have a TTL != 1, so: capture only mDNS packets with TTL != 1 when decapsulating mDNS packets, set TTL = 1 where TTL is the IP Time-to-live field capture rate. mDNS packets are incapsulated into OLSR messages, which in turn are contained in OLSR packets that are sent at the wireless basic rate (i.e. 1 or 2 Mbps) over the whole network. Thus a big amount of mDNS captured packets in a small time can slow down the whole network. A solution to this is to add a plug-in configuration option to set the maximum packet capture rate.