[Olsr-users] Broadcast Packets & Windows Routing

Erik Tromp (spam-protected)
Fri Feb 22 09:36:12 CET 2008

> The BMF plugin use a thread of it's own to handle incoming 
> packages through the tap device and through it's 
> communication socket. Unfortunately no Olsrd datastructure 
> was designed to be accessed and modified by multiple threads at once.

I agree, OLSR should provide a way to plugins for them to thread-safely
access (or at least read) the OLSR data.

Currently the plugins that use threads (dyn_gw and bmf) may cause race
conditions if their own thread is accessing data at the same time
the OLSR thread is.

Yes, even the dyn_gw has a race condition, although the probability
of it happening is very small (but you know Murphy's law :-). The race
condition is found in the fact that the function 'olsr_event_doing_hna'
(called from an OLSR thread) accesses the 'the_hna_list' data
structure, in which the function 'looped_checks' (called from the
plugin thread) may be writing at the same time.


More information about the Olsr-users mailing list