[olsr-dev] Patch: for (some Qs about exending the dyn_gw plugin)

Jens Nachtigall (spam-protected)
Tue Nov 30 00:19:32 CET 2004

Hi Andreas,

> 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...
Name: dyn_gw-ping2.patch
Type: text/x-diff
Size: 7754 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20041130/f6d7a191/attachment.patch>

More information about the Olsr-dev mailing list