Пытаюсь при помощи офциального урфа клиента внести изменения в радиус-атрибуты сервиса, имеем следующую картину:
Биллинг:
Код: Выделить всё
NetUP UTM billing system core. Compile date: Apr 1 2016 12:55:21
Version:5.3-003-update15-centos6_x64 Rev #15609
Код: Выделить всё
<function name="rpcf_set_radius_attr" id="0x10103">
<input>
<integer name="sid" />
<integer name="st" />
<integer name="cnt" />
<for name="i" from="0" count="cnt">
<integer name="vendor" array_index="i" />
<integer name="attr" array_index="i" />
<integer name="usage_flags" array_index="i" />
<integer name="expire_date" array_index="i" default="2000000000"/>
<integer name="param1" array_index="i" />
<if variable="param1" value="1" condition="eq">
<string name="cval" array_index="i" />
</if>
<if variable="param1" value="2" condition="eq">
<integer name="ival" array_index="i" />
</if>
<if variable="param1" value="3" condition="eq">
<string name="val" array_index="i" />
</if>
<integer name="prop_size" array_index="i"/>
<for name="p" from="0" count="prop_size">
<integer name="type" array_index="i,p"/>
<string name="value" array_index="i,p"/>
</for>
</for>
</input>
<output/>
</function>
Код: Выделить всё
<urfa>
<parameter name="sid" />
<parameter name="st" value="5" />
<parameter name="cnt" />
<call function="rpcf_set_radius_attr" />
</urfa>
Имеется следующий дата-файл:
Код: Выделить всё
<?xml version='1.0' encoding='utf-8'?>
<urfa>
<array comment="" dimension="2" name="vendor">
<dim>14988</dim>
<dim>14122</dim>
</array>
<array comment="" dimension="2" name="attr">
<dim>17</dim>
<dim>4</dim>
</array>
<array comment="" dimension="2" name="usage_flags">
<dim>17</dim>
<dim>17</dim>
</array>
<array comment="" dimension="2" name="param1">
<dim>0</dim>
<dim>1</dim>
</array>
<array comment="" dimension="2" name="cval">
<dim>300</dim>
<dim>http://www.example.com</dim>
</array>
<array comment="" dimension="2" name="ival">
<dim>300</dim>
<dim>http://www.example.com</dim>
</array>
<array comment="" dimension="2" name="val">
<dim>300</dim>
<dim>http://www.example.com</dim>
</array>
<array comment="" dimension="2" name="prop_size">
<dim>0</dim>
<dim>0</dim>
</array>
</urfa>
Код: Выделить всё
utm5_urfaclient -a set_radius_attr -sid 10 -cnt 2 -datafile /tmp/blafoo
Код: Выделить всё
<?xml version="1.0"?>
<urfa>
<session key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
<call function="rpcf_set_radius_attr">
<output/>
</call>
</urfa>
В debug.log видим следующее:
Код: Выделить всё
Dec 06 18:38:01 ?Debug : ace0d700 RPCConn[SSL]<xxx@xxx.xxx.xxx.xxx>: Call: 0x10103 (rpcf_set_radius_attr)
Dec 06 18:38:01 ?Debug : ace0d700 RPCConn[SSL]<xxx@xxx.xxx.xxx.xxx>: Real Call: 0x10103 (rpcf_set_radius_attr)
Dec 06 18:38:01 ERROR : ace0d700 RPCServer@xxx.xxx.xxx.xxx: Exception in void* rpcf_set_radius_attr(void*): [unknown]
Dec 06 18:38:01 ?Debug : ace0d700 RPCConn[SSL]<xxx@xxx.xxx.xxx.xxx>: Call 0x10103 (rpcf_set_radius_attr) finished in 0.05 sec
При этом если изменить массив param1 и поставить там все 1, то скрипт отрабатывает полостью, но тип у радиус атрибутов выставляется в "Строка"
Т.е. почему то rpcf_set_radius_attr работает только если в массиве param1 передать все 1. Любые другие значения (0, 2, 3) приводят к вышеуказанной ошибке в debug.log.
Подскажите, может я как-то неверно передаю параметры? Или это баг и стоит писать в hotline?