[Olsr-dev] Olsrd v0.9.5 and plugin jsoninfo

(spam-protected) (spam-protected)
Thu Dec 22 17:42:11 CET 2016


Ok I have check olsrd compile for Openwrt v12.09 AA and described by
me problems with jsoninfo plugin are on this version Openwrt. I use
still Openwrt v12.09 AA because it is last version of OpenWRT which we
can use on UBIQUIT hardware with processors 180 Mhz like Nanostation
2, Naostation 5, Nanostation Loco 5

but when i have compile olsrd v0.9.5 for OpenWRT CC v15.05 and update
on my router all requests informations from jsonplugin like /links and
/routes
working  OK.

We have only problem for update olsrd to v0.9.5 for Ubiquiti
nanostation 2 or 5 or Loco 2 or Loco 5 and TPLink WA5210G where olsrd
v0.9.5 txtplugin working without problems but jsoninfo plugin don't
work for requests /links /routes but work for request /mid /gateways
/2hop

when we use command:

echo /links | nc 127.0.0.1 9090

or

echo /routes | nc 127.0.0.1 9090

but request

echo /gateway | nc 127.0.0.1 9090

work OK but for not useful :-( to show some parameters from OLSRD like
information about links and routes

Regards

Waldek


2016-12-22 17:05 GMT+01:00 Waldek Waldek <(spam-protected)>:
> Hi Ufo,
>
> Ok but why a I can ask jsoninfo with command /mid /gateways /2hop and
> get information from jsoninfo plugin use telnet or
>
> echo /mid | nc 127.0.0.1 9090
>
> but when I want ask jsoninfo about /links or /routes for example
>
> echo /links | nc 127.0.0.1 9090
>
> olsrd stop working
>
> I have tests directly on router (not via network) this commands.
>
> I don't have any problems with txtinfo and jsoninfo  plugins with
> olsrd 0.9.0.3 and txtinfo plugin with v0.9.5 but exist problem for
> olsrd v0.9.5 with part of commands jsoninfo: /links /routes, others
> commands like /mid /gateways works
>
>
>
>
>
> 2016-12-22 16:27 GMT+01:00 Ufo <(spam-protected)>:
>> i also tried to crash olsr. (on LEDE trunk from yesterday) but i think its
>> some kind of hanging-process/deniel-of-service-attack instead of a
>> code-crash.
>> olsr will restart (due to olsr-watchdog) and doesnt have a dump/core-file
>> for gdb for me
>>
>>> Dec 22 14:50:00 2016 user.notice OLSR watchdog: Process died - restarting!
>>> [ 1369.947516] TCP: request_sock_TCP: Possible SYN flooding on port 9090.
>>> Sending cookies.  Check SNMP counters.
>>
>> problem: a telnet connect to jsonplugin (also from outside of the device)
>> will deny/halt/stop all other jsonplugin-calls. if you then wait too long
>> the olsr-watchdog will cause a olsr-restart. sp2ong, please have a look in
>> dmesg/logread for such messages.
>>
>> at doku (http://www.olsr.org/?q=jsoninfo_plugin) i read
>>
>> "If no address is specified, then localhost (127.0.0.1) is allowed by
>> default."
>>
>> but that doesnt seems to work any more!? On my testdevice there are no
>> PlParams for jsonplugin, BUT i can make telnet/nc connection from
>> outside/other meshnodes. when i ask for "/routes" a message appears "403
>> Forbidden". the port is open, and one connection to that will block/dos the
>> jsonplugin.
>>
>>
>> mfg ufo
>>
>>
>>
>> On 22.12.2016 09:50, Ferry Huberts wrote:
>>
>> It all works for me, on Linux with glibc
>>
>> I really need a backtrace to be able determine what is going on.
>> Run olsrd under gdb please to generate a backtrace.
>>
>> On 22/12/16 09:47, (spam-protected) wrote:
>>
>> I have check similar txtinfo plugin use telnet command and when I have
>> request /rou and /lin all information were showed and OLSRD process
>> not crash
>>
>> 2016-12-22 9:44 GMT+01:00  <(spam-protected)>:
>>
>> Hi
>>
>> I know this information about scripts from changelog but I have tray
>> get manually information from jsonplugin use simple unix command
>>
>> echo /routes | nc 127.0.0.0.1 9090
>>
>> where 9090 is port for jsonplugin and when I have ask plugin jsoninfo
>> about 'routes' OLSRD process crash
>>
>> I can do similar use telnet command:
>>
>> telnet 127.0.0.1 9090
>>
>> and when next send command /mid all information is showed but when I
>> have send command in telnet session /routes main OLSRD process crash
>>
>> If I send bad command to jsoninfo I have proper info about invalid requests
>> :
>> telnet 127.0.0.1 9090
>> /lin
>> HTTP/1.1 404 Not Found
>> Date: Thu, 22 Dec 2016 08:39:05 GMT
>> Server: OLSRD JSONINFO
>> Connection: close
>> Content-Type: application/vnd.api+json
>> Access-Control-Allow-Origin: *
>> Access-Control-Allow-Methods: GET, POST, OPTIONS
>> Access-Control-Allow-Headers: Accept, Origin, X-Requested-With
>> Access-Control-Max-Age: 1728000
>> Content-Length: 0
>> Cache-Control: no-cache
>>
>> When I have send correct request like /mid I receive all iformation:
>>
>> telnet 127.0.0.1 9090
>> /mid
>> HTTP/1.1 200 OK
>> Date: Thu, 22 Dec 2016 08:41:24 GMT
>> Server: OLSRD JSONINFO
>> Connection: close
>> Content-Type: application/vnd.api+json
>> Access-Control-Allow-Origin: *
>> Access-Control-Allow-Methods: GET, POST, OPTIONS
>> Access-Control-Allow-Headers: Accept, Origin, X-Requested-With
>> Access-Control-Max-Age: 1728000
>> Content-Length: 465
>> Cache-Control: no-cache
>>
>> {"pid": 27325,"systemTime":
>> .....
>>
>>
>> but when I have try use /links or /routes not inforation and OLSRD
>> stop working and it lis look like crash process because I must again
>> restart olsrd
>>
>> telnet 127.0.0.1 9090
>> /links
>> Connection closed by foreign host
>>
>>
>>
>>
>>
>> 2016-12-22 9:18 GMT+01:00 Ferry Huberts <(spam-protected)>:
>>
>>
>>
>> On 22/12/16 09:10, (spam-protected) wrote:
>>
>> After success compile olsrd 0.9.5 I have update package on my openwrt router
>> I have use plug-in jsoninfo to get information 'links' and 'routes'
>> use following command:
>>
>> echo /links | nc 127.0.0.1 9090
>>
>> Now after upgrade to v0.9.5 plugin jsoninfo crash olsrd when I have
>>
>>
>> Please provide your commands and the backtrace.
>>
>> Also - from the changelog - read this:
>>
>> Note: The txtinfo and jsoninfo plugins were 'merged' to use a common
>>       codebase for receiving requests and dispatching replies. Also,
>>       these plugins were subjected to review and fixes. As a result:
>>       - request handling has become much stricter, e.g. a txtinfo
>>         request '/links' will no longer work since the correct request is
>>         (and has always been) '/lin'.
>>       - some fixes change the format and/or content of txtinfo and/or
>>         jsoninfo output. An example is the txtinfo output of the request
>>         '/mid' when 'vtime' is enabled on txtinfo; this has been broken
>>         since the end of 2009 (c555a44).
>>       - invalid requests will return HTTP error status code
>>         "Not Found" (404) when HTTP headers are enabled, and report
>>         an error in the output when they are not enabled.
>>       - requests without output will return HTTP error status code
>>         "No Content" (204) when HTTP headers are enabled, and report
>>         an error in the output when they are not enabled.
>>
>>       It is VERY strongly advised to check your scripts and applications
>>       interfacing with olsrd txtinfo and/or jsoninfo before switching
>>       to this version of olsrd.
>>
>>
>> use check following
>> parameters
>>
>> links
>> routes
>> topology
>> interfaces
>>
>> when I have check following parameters
>>
>> hna
>> gateways
>> mid
>> neighbors
>> 2hop
>> sgw
>>
>> I have information from jsoninfo and olsrd not crash
>>
>> I have check olsrd 0.9.5 compiled and running on debian all working OK
>> but under openwrt
>> crash process when I want to get information about links and routes
>>
>> Anybody have similar problems with olsrd 0.9.5 running under openwrt ????
>>
>> Regards
>>
>> Waldek
>>
>>
>> --
>> Ferry Huberts
>>
>>
>>
>>
>> --
>> Olsr-dev mailing list
>> (spam-protected)
>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>
>
>
> --
> Waldek sp2ong



More information about the Olsr-dev mailing list