[Olsr-users] new olsr + jsoninfo-plugin on lede/openwrt tests

Ufo (spam-protected)
Tue Dec 6 17:38:04 CET 2016


On 06.12.2016 16:33, Ferry Huberts wrote:
>> i propose it would be better to have a default setting "with
>> http-header:false" for downwards-compatibility, so the config for olsr
>> wouldnt need to be changed (we are using olsr for years with same 
>> config!)
>> if anyone wants to use the new "http-header" feature, (s)he can enable
>> that..
>
> JSON servers must send HTTP headers, see 
> http://jsonapi.org/format/#content-negotiation-servers
>
> So this is a correctness fix.

omg, ok.
so it might be better to correct the neigh.sh (and luci) command dealing 
with http-headers instead of killing http-headers!?

"tail" is my (bad) friend, for luci it could look like that:

(spam-protected):~# grep 13 /usr/lib/lua/luci/controller/olsr.lua
jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. "|tail 
-n +13) 2>/dev/null" )
jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port 
.. "|tail -n +13) 2>/dev/null")


> Although I now see that the current 'Content-Type' is wrong.
> I'll fix that in a minute.
>
ok, that doenst bother freifunk nodes (at least our freifunk systems). 
who or what system is able to use that?

>
>>
>> Konsole output
>> (spam-protected):~# echo /NetworkRoutes | nc 127.0.0.1 9090
>> {"pid": 1879,"systemTime": 1481035827,"timeSinceStartup":
>> 1689342,"error": "404 Not Found"}
>>
>
> Works for me.
> The netjson plugin has its own port, 2005 by default.
>

there is no port-2005 on my testrouter! but, im talking about 
jsoninfo-plugin.
no "netjson"-plugin available on package-repo, or on my buildserver 
(make menuconfig).

Konsole output
(spam-protected):/srv2/lede/lede-20161124$ grep olsr .config | grep json
CONFIG_PACKAGE_luci0-olsr-to-netjson=m
CONFIG_PACKAGE_olsrd-mod-jsoninfo=m

you wrote:
 > fixes adjust txtinfo to not use http headers by default

we are using txtinfo with collectd-mod-olsrd, and it was still working 
with new olsr 0.9.5.
i will compile your changes and hopefully we have a new software, in a 
few days.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20161206/7d4a3635/attachment.html>


More information about the Olsr-users mailing list