[Olsr-dev] HNA - minor issues

Teco Boot (spam-protected)
Fri Jan 29 19:31:17 CET 2010

I tried the olsrd_dyn_gw with HNA.
And ping check to localhost.
This eliminates a need for dyn_gw_plain.
(a bit quick and dirty ;-)
But: It doesn't work.

LoadPlugin "olsrd_dyn_gw.so.0.4"
PlParam  "Interval"   "1"
PlParam "HNA"   "" 
PlParam  "Ping"  ""

---------- LOADING LIBRARY olsrd_dyn_gw.so.0.4 ----------
OLSRD dynamic gateway plugin 0.4 by Various artists
Checking plugin interface version:  5 - OK
Trying to fetch plugin init function: OK
Trying to fetch parameter table and it's size... 
Sending parameters...
"Ping"/""... Ping: OK
Fatal error in plugin parameter "HNA"/""
"Interval"/"1"... Got int 1
Interval: OK
Running plugin_init function...
HNA[0050a8c0/000000c0] is invalid
HNA[00000000/00000000] is invalid
---------- LIBRARY olsrd_dyn_gw.so.0.4 FAILED ----------

I think I found the bug. The code for the netmask uses the netaddr field.

  //printf("%s():i:%i; net:%s; mask:%s\n",__func__,i,s_netaddr,s_mask);
  if (inet_pton(olsr_cnf->ip_version, s_netaddr, &temp_net) <= 0) {
    OLSR_PRINTF(0, "Illegal IP address \"%s\"", s_netaddr);
    return 1;
  //printf("GOT: %s(%08x)",inet_ntoa(foo_addr),foo_addr.s_addr);
  if (inet_pton(olsr_cnf->ip_version, s_netaddr, &temp_netmask) <= 0) {
    OLSR_PRINTF(0, "Illegal netmask \"%s\"", s_netaddr);
    return 1;

Regards, Teco

>-----Oorspronkelijk bericht-----
>Van: Henning Rogge [mailto:(spam-protected)]
>Verzonden: vrijdag 29 januari 2010 14:34
>Aan: (spam-protected)
>CC: Teco Boot
>Onderwerp: Re: [Olsr-dev] HNA - minor issues
>On Fri January 29 2010 13:11:21 Teco Boot wrote:
>> I played a bit with dynamic default gateways.
>> Minor issues:
>> Sample config for plain dynamic gw is incorrect:
>> # olsrd_dyn_gw_plain.so.0.4
>> # {
>> # }
>> Should be:
>> #LoadPlugin "olsrd_dyn_gw_plain.so.0.4"
>> #{
>> #}
>Good catch, thank you.
>> I need dynamic HNA for prefixes (for priority gef.gw,
>> with /0, /1 and /2).
>> Add net mask parameters, like olsrd_dyn_gw?
>dyn_gw_plain is a very simple plugin, at the moment we have not planned
>> On the def.gw, the HNA timeout is pretty long.
>> When removing a HNA, send a poison entry with lifetime 0?
>Theoretically we could send a HNA with minimal vtime (0 cannot be
>in OLSR vtime). We are discussing about it in the context of node
>The problem with "vtime 0" is that we have only one try to do it. If we
>a "vtime 0" HNA, we will reactivate the HNA route on nodes which
>received the
>first one (for 1/16 seconds).
>> And add the lock file parameter?
>> This did not make it into 0.5.6-r8.
>> # OLSR daemon lockfile
>> # Defaults to configuration file path appended with ".lock"
>> #   LockFile        "/var/run/olsrd.lock"
>This is already in the "stable tip" version of the default config files:
># LockFile
># The lockfile is used to prevent multiple OLSR instances running at the
># time. On linux/bsd it defaults to "/var/run/olsrd-ipv(4/6).lock", on
># systems to "<configfile>-ipv(4/6).lock".
># LockFile "olsrd.lock"
>Henning Rogge
>Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
>Kommunikation, Informationsverarbeitung und Ergonomie FKIE
>Kommunikationssysteme (KOM)
>Neuenahrer Straße 20, 53343 Wachtberg, Germany
>Telefon +49 228 9435-263,   Fax +49 228 9435 685
>mailto:(spam-protected) http://www.fkie.fraunhofer.de
>GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

More information about the Olsr-dev mailing list