[olsr-dev] Patch: for (some Qs about exending the dyn_gw plugin)
Tue Nov 30 00:19:32 CET 2004
> This looks cool, but there seems to me there is one major problem.
> There is no protection of the access to the hna set from the thread.
> This critical section should be protected in some way or it might
> lead to a race condition. One could register a scheduled
> event(running in olsrds thread) that updates routes based on
> information shared with the ping thread
Thanks for your comments. I now did it this way. Please see the revised
patch I attached. The scheduled olsr_event_doing_hna function is called
every 3 seconds and acts according to has_available_gw variable (equals
the return value of check_gw) and has_inet_gw.
This means there is at most a delay of 3 secs for the update of the hna
table, which is acceptable imo.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7754 bytes
Desc: not available
More information about the Olsr-dev