[Olsr-dev] BUGs found in MPR selection algorithm and Default message Forwarding Algorithm

Henning Rogge (spam-protected)
Mon Mar 23 20:56:03 CET 2009


On Montag 23 März 2009 19:44:08 Andres Medina wrote:
> This mail is to report 2 bugs we found it the code of olsrd. As we don't
> use the source control utilities that you have and we are not involved
> in the development of the code, I'm going to do my best to describe the
> two bugs here:
>
> Bug #1:
> Navigate to line 175 of mpr.c of the olsrd-0.5.6-r3 code or look for the
> following piece of code in your current source:
> --
>     if (second_hop_entries->neighbor_2->mpr_covered_count >=
> olsr_cnf->mpr_coverage)
>       count++;
> --
>
> The count variable holds the number of nodes that are reached by the
> current MPR set. The variable mpr_coverage is set to 1 and never
> changes. The condition of the "if" is satisfied every time the node is
> reached by an MPR. Thus, when a node is reached by two MPRs, then this
> count is incremented by two, which should not be the case. The solution
> is very simple: the condition should be changed to == insted of >=.
I have to look at the code, the MPR stuff is a little bit older...

> Bug #2:
> Navigate to line 319 of olsr.c of the olsrd-0.5.6-r3 code or look for
> the following piece of code in your current source:
> --
>   /* Check MPR */
>   if (olsr_lookup_mprs_set(src) == NULL) {
> #ifdef DEBUG
>     struct ipaddr_str buf;
>     OLSR_PRINTF(5, "Forward - sender %s not MPR selector\n",
> olsr_ip_to_string(&buf, src));
> #endif
>     return 0;
>   }
>
>   if (olsr_message_is_duplicate(m)) {
>     return 0;
>   }
>
> --
>
> The code olsr_message_is_duplicate(m), should be executed even if the
> node processing the packets is not an MPR of the src node. This is also
> very easy to correct.
No, I think you are wrong.

olsr_message_is_duplicate() checks and maintains the OLSR duplicate database. 
So if you first call this function and then throw the package away because it 
was no MPR then you would drop it if you get it from an MPR later, which would 
be wrong in my oppinion. What do you think ?

Henning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090323/79cd054d/attachment.sig>


More information about the Olsr-dev mailing list