When using IPv4, OLSR control traffic is to be broadcasted on UDP port 698. However, the RFC does not specify what broadcast address is to be used. The natural choice is to use the broadcast address an interface is preconfigured with when transmitting on that interface.
Broadcast addresses are usually made up of the interface address
bitwise OR'ed with the inverse of the netmask. If an interface is
configured with the address 192.168.44.23 with netmask 255.255.255.0
then the broadcast address would be 192.168.44.23 OR
0.0.0.255 = 192.168.44.255.
The UDP/IP implementation in GNU/Linux will only pass received broadcasted messages up the stack if the message is destined either for the broadcast address that the receiving interface is configured with, or in the special case of using the broadcast address 255.255.255.255. If using the broadcast address fetched from the interface, OLSR traffic will only be received by other nodes using communication interfaces configured with the same broadcast-address, usually meaning that the interface is configured with an IP address in the same subnet as the sender. However, in the 255.255.255.255 case, all nodes receiving the data will always pass the message up the networking stack, if, as described in the next section, address-spoofing filtering is disabled on the receiving device. This means that all IPv4 addresses can be used by nodes in such a MANET without any consideration for subneting.
Since ad-hoc networks often should be ``open'' solutions with no special infrastructure, using 255.255.255.255 as destination for control-traffic can be seen as a good solution in many scenarios. Actually, the AODV RFC explicit says that all control traffic is to be broadcasted 255.255.255.255, so this is not an unknown approach.
In olsrd, one can specify the broadcast address to use in the configuration file. By default, the broadcast address used is the one an interface is set up with.
Andreas 2004-07-29