[Olsr-users] Does olsrd-0.5.4 work as intended?
Joerg Pommnitz
(spam-protected)
Mon Nov 12 15:05:52 CET 2007
Hello all,
I just gave olsrd-0.5.4 an initial try. It seems to work, but I'm not sure it works as intended.
Strange things I noticed:
1) The olsrd screen seems to referesh on every(!!) scheduler loop, even if no changes in the underlying network occured. This is in contrast to earlier versions of olsrd where the screen reflected only changes in the network.
2) it seems that olsrd tries to add routes through each MANET node to this node itself, e.g. to 10.0.0.7/32 via 10.0.0.7. This seems strange and actually causes error messages.
Strangenes 2) actually seems to point to a bug in olsr_add_kernel_route:
323 static void
324 olsr_add_kernel_route(struct rt_entry *rt)
325 {
326 olsr_16_t error;
327
328 if(!olsr_cnf->host_emul) {
329
330 if(olsr_cnf->ip_version == AF_INET) {
331 error = olsr_export_add_route(rt);
332 } else {
333 error = olsr_export_add_route6(rt);
334 }
335
336 if(error < 0) {
337 const char * const err_msg = strerror(errno);
338 OLSR_PRINTF(1, "KERN: ERROR adding %s: %s\n",
339 olsr_rtp_to_string(rt->rt_best), err_msg);
340
341 olsr_syslog(OLSR_LOG_ERR, "Add route: %s", err_msg);
342 } else {
343
344 /* route addition has suceeded */
345
346 /* save the nexthop in the route entry */
347 rt->rt_nexthop = rt->rt_best->rtp_nexthop;
348 }
349 }
350 }
olsr_export_add_route calls the registered routing hooks. The code relies
on the fact that the return value is actually from the olsrd route setting
function. This looks fishy, but actually works because of the way the hooking
is done (the first hook installed gets called last). However, that's not the
real problem, but the following is: as detailed in 2), olsrd tries to set bogus
routes. Because the kernel does not register these routes, we always end up in
the error path.
Am I missing something? --
Regards
Joerg
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail - www.yahoo.de/mail
More information about the Olsr-users
mailing list