Something just crept out of the back of my head:

On Fre, 2007-10-19 at 08:14 +0200, Hannes Gredler wrote:
> On Fri, Oct 19, 2007 at 10:10:40AM +1000, David Orchansky wrote:
[...]
> |    After spending many days tracing the problem I fixed this issue by
> |    initializing some variables in a function... that was it!
> |  
> |    File:       mpr.c 
> |    Function:   void olsr_calculate_mpr(void)
> |      olsr_u16_t two_hop_covered_count=0;
> |      olsr_u16_t two_hop_count=0;

If you have that version around (and dare or care to check;-): Are there
a few lines below a line "+=" that variable?

IIRC that "below line" was buggy (a "+=" instead of the "=" as above)
until shortly when I fixed in the CVS. And it was the same thing also
detected by Coverty's tools (and BTW not by gcc as an uninitialized
variable).

> |    Anyway, I don't know if this is gonna be helpful to anyone, but it
> |    would save some time and effort to many of us.
[...]
> first of all thanks for your debugging efforts, this is highly appreciated.

Full ACK[0].

[...]
> --
> 
> i am not sure i understand the nature of the problem
> IMO the two variables get properly assigned:
> 
> ---
> 
> void
> olsr_calculate_mpr(void) (line 461 / mpr.c)
> {
>   olsr_u16_t                   two_hop_covered_count;
>   olsr_u16_t                   two_hop_count;
>   int i;
> 
>   OLSR_PRINTF(3, "\n**RECALCULATING MPR**\n\n");
> 
>   olsr_clear_mprs();
> >>  two_hop_count = olsr_calculate_two_hop_neighbors();
> >>  two_hop_covered_count = add_will_always_nodes();
> 
> --
> 
> pls elaborate *why* you think this is wrong.

This is always good (if not necessary) - since we also want to
understand your concerns/problems.

	Bernd

[0]: And I'm well aware that producing a good error report is at least
        as much work as actually fixing the bug is.
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




