[Olsr-dev] jsoninfo ipv6only flag / OpenWrt

cholin (spam-protected)
Thu Oct 23 19:29:22 CEST 2014


It seems to work when I change the types for ipv6only in jsoninfo and
txtinfo from bool to int (see [1]). Maybe OpenWRT is building olsrd in
c89 mode und therefor _Bool [2] may be missing and we end up in
undefined behaviour [3]. You can test this for yourself by setting the
routing feed in feeds.conf to

src-git routing
git://github.com/cholin/packages.git^25a47b48cbc7ef22f0343766606a1cb5be5114b2

Regards
Nico

[1]
https://github.com/cholin/packages/commit/25a47b48cbc7ef22f0343766606a1cb5be5114b2
[2]
http://olsr.org/git/?p=olsrd.git;a=blob;f=src/olsr_types.h;h=51690d2da6403fb05c9fa6b592468dadff89add4;hb=refs/heads/release-0.6.7#l73
[3]
https://stackoverflow.com/questions/16541899/why-does-gcc-not-complain-about-bool-in-c89-mode

Am 23.10.2014 um 10:28 schrieb Bastian Bittorf:
> * cholin <(spam-protected)> [23.10.2014 10:06]:
>> LoadPlugin "olsrd_jsoninfo.so.0.0"
>> {
>> 	PlParam "accept" "::"
>> 	PlParam "ipv6only" "true"
>> }
>>
>> Am I misunderstanding this option or what am I doing wrong here?
> 
> i did the same on openwrt with:
> olsr.org-0.6.7-git_fa1ee2b-hash_02c74aa5e398954425461ade7b4ccc90
> 
> # this is in '/etc/config/olsrd'
> config LoadPlugin
>         option library 'olsrd_jsoninfo.so.0.0'
>         option port 5555
> #       option "accept" "::"
>         option "ipv6only" "true"
> 
> what is strange is, that '::' seems to be invalid
> in /lib/functions/olsrd.sh - but anyway:
> 
> # this is in the generated '/var/etc/olsrd.conf'
> LoadPlugin "olsrd_jsoninfo.so.0.0"
> {
>         PlParam "port" "5555"
>         PlParam "ipv6only" "true"
> }
> 
> (spam-protected):~ echo all | nc 127.0.0.1 5555 | wc -l
> 11782
> 
> hmmm...bye, bastian
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20141023/9eb0c80c/attachment.sig>


More information about the Olsr-dev mailing list