[Olsr-dev] BUGs found in MPR selection algorithm and Default message Forwarding Algorithm
Andres Medina
(spam-protected)
Mon Mar 23 19:44:08 CET 2009
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 >=.
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.
--
Andres Medina
Department of Electrical and Computer Engineering
University Of Delaware
(spam-protected)
More information about the Olsr-dev
mailing list