[Olsr-dev] Nameservice patch (add mid entries, seeking comments)

Jo-Philipp Wich (spam-protected)
Thu Dec 27 16:57:09 CET 2007

Hash: SHA1

Hello List,

I developed a patch against the nameservice plugin to also include known
MID entries in the hosts file. We're using this modification since
v0.4.8 of OLSRd in our Freifunk Leipzig Firmware without any problems
observed (so far) ;)

I changed the write_hosts_file() function to lookup known MIDs for every
IP/hostname pair that's about to be written to the hosts file. Every MID
will be written as additional hostname "midX.hostname.domain" to the file.

Here's an excerpt from my /etc/hosts generated by the patched
nameservice plugin:

- --- 8< ---    150-5.olsr      #  mid1.150-5.olsr # (mid #1)  mid2.150-5.olsr # (mid #2)
- --- >8 ---

The "midX." prefix format is declared as #define in nameservice.h .
I know that it will be better to make this configurable via a plugin
parameter or something like that. Unfortunately that's beyond my
knowledge and I'll need help to achieve that.

The attached patch should apply against current HEAD, I've used it
yesterday to compile the newest OLSR version for 24c3.

What are your opinions or suggestions about the patch?

Greetings from Leipzig,
jow / xM
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: olsrd-nameservice-mid.patch
Type: text/x-patch
Size: 2742 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20071227/207327d2/attachment.bin>

More information about the Olsr-dev mailing list