[Olsr-dev] [PATCH] fix olsr.init script function olsrd_write_plparam() as it wrongly removes dashes. olsrd deamon did not start when the nameservice plugin was active.

Saverio Proto (spam-protected)
Thu Apr 25 18:36:30 CEST 2013


I loaded your same configuration and I cannot reproduce the bug :(
can you attach the version of /etc/init.d/olsrd you are using ?

I am using this one at commit 0015a5a216914ddf35abccefb530b0f7c651c857
of this repo: https://github.com/openwrt-routing/

If you are using a new version, we might had introduced the bug.

Bastian are you with us ?

Saverio


2013/4/25 Thomas Hühn <(spam-protected)>:
> Hi,
>
> My olsr.conf:
>
> (spam-protected):~# cat /etc/config/olsrd
>
> config olsrd 'olsrd'
> option IpVersion '4'
> option FIBMetric 'flat'
> option LinkQualityLevel '2'
> option LinkQualityAlgorithm 'etx_ff'
> option OlsrPort '698'
> option Willingness '7'
> option NatThreshold '1.0'
> option UseHysteresis 'no'
> option SmartGateway 'no'
> option LinkQualityFishEye '1'
>
> config LoadPlugin 'olsrd_arprefresh'
> option library 'olsrd_arprefresh.so.0.1'
> option ignore '0'
>
> config LoadPlugin 'olsrd_nameservice'
> option ignore '0'
> option library 'olsrd_nameservice.so.0.3'
> option latlon_file '/var/run/latlon.js'
> option hosts_file '/var/etc/hosts.olsr'
> option sighup_pid_file '/var/run/dnsmasq.pid'
> option suffix '.evernet'
> option interval '180'
> option lat '51.15777514714358'
> option lon '10.715950132256015'
> option timeout '3600'
> option name 'Bluse-home'
>
> config LoadPlugin 'olsrd_txtinfo'
> option library 'olsrd_txtinfo.so.0.1'
> option accept '0.0.0.0'
>
> config InterfaceDefaults 'InterfaceDefaults'
> option Ip4Broadcast '255.255.255.255'
> option Mode 'mesh'
>
> config LoadPlugin 'olsrd_watchdog'
> option library 'olsrd_watchdog.so.0.1'
> option file '/var/run/olsrd.watchdog'
> option interval '30'
>
> config LoadPlugin
> option library 'olsrd_dyn_gw_plain.so.0.4'
> option ignore '1'
>
> config Interface 'backbone'
> option interface 'backbone'
> option Mode 'ether'
> option HelloInterval '11.0'
> option HelloValidityTime '500.0'
> option MidInterval '100.0'
> option MidValidityTime '2000.0'
> option HnaInterval '40.0'
> option HnaValidityTime '500.0'
>
> config Interface 'wireless0'
> option interface 'wireless0'
> option Mode 'mesh'
> option HelloInterval '11.0'
> option HelloValidityTime '500.0'
> option MidInterval '100.0'
> option MidValidityTime '2000.0'
> option HnaInterval '40.0'
> option HnaValidityTime '500.0'
>
> config Interface 'wireless1'
> option interface 'wireless1'
> option Mode 'mesh'
> option HelloInterval '11.0'
> option HelloValidityTime '500.0'
> option MidInterval '100.0'
> option MidValidityTime '2000.0'
> option HnaInterval '40.0'
> option HnaValidityTime '500.0'
>
> config Hna4
> option netaddr '10.10.4.0'
> option netmask '255.255.255.0'
>
>
> The error message without the patch while starting olsrd manually with the
> generated config file are (dashes are gone) :
>
> OLSRD nameservice plugin 0.3
>
>
>
> Fatal error in plugin parameter "sighup pid file"/"/var/run/dnsmasq.pid"
>
>
>
> Fatal error in plugin parameter "hosts file"/"/var/etc/hosts.olsr"
>
>
> Bye Bluse
>
> On 25.04.2013, at 17:47, Saverio Proto <(spam-protected)> wrote:
>
> I cannot reproduce the bug:
>
> (spam-protected):~# uci show olsrd
> (spam-protected)[0]=olsrd
> (spam-protected)[0].IpVersion=4
> (spam-protected)[0].RtTableDefault=112
> (spam-protected)[0].RtTable=111
> (spam-protected)[0]=LoadPlugin
> (spam-protected)[0].library=olsrd_arprefresh.so.0.1
> (spam-protected)[1]=LoadPlugin
> (spam-protected)[1].library=olsrd_nameservice.so.0.3
> (spam-protected)[1].name=my-name.mesh
> (spam-protected)[2]=LoadPlugin
> (spam-protected)[2].library=olsrd_txtinfo.so.0.1
> (spam-protected)[2].accept=0.0.0.0
> (spam-protected)[0]=Interface
> (spam-protected)[0].interface=lan
> (spam-protected)[0].speed=7
> (spam-protected)[0]=Hna4
> (spam-protected)[0].netaddr=10.183.2.0
> (spam-protected)[0].netmask=255.255.255.0
>
> (spam-protected):~# cat /var/etc/olsrd.conf | grep nameservice -A 5
> LoadPlugin "olsrd_nameservice.so.0.3"
> {
>        PlParam "name" "my-name.mesh"
> }
>
>
> Send me also your /etc/config/olsrd please.
>
> thanks
>
> Saverio
>
>
>
>
> 2013/4/25 Saverio Proto <(spam-protected)>:
>
> Can you send me the UCI configuration that was not working for you
> before the patch ?
>
> thanks
>
> Saverio
>
>
> 2013/4/25 Thomas Huehn <(spam-protected)>:
>
> Signed-off-by: Thomas Huehn <(spam-protected)>
> ---
> olsrd/files/olsrd.init | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/olsrd/files/olsrd.init b/olsrd/files/olsrd.init
> index 7ffe33c..f4641aa 100644
> --- a/olsrd/files/olsrd.init
> +++ b/olsrd/files/olsrd.init
> @@ -153,8 +153,11 @@ olsrd_write_plparam() {
>                return 1
>        fi
>
> -       oldIFS="$IFS"; IFS='-_'; set -- $option; IFS="$oldIFS"
> +       oldIFS="$IFS"
> +       IFS='-_'
> +       set -- $option
>        option="$*"
> +       IFS="$oldIFS"
>        _option="$option"
>
>        if [ "$option" = 'hosts' ]; then
> --
> 1.8.1.3
>
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev
>
>




More information about the Olsr-dev mailing list