Bug #3522
AppFilter 过滤接口设置name包含空格时,name属性未设置成功
0%
Description
测试步骤:
1.telnet登陆网关后,执行以下命令,设置app过滤策略(黑名单 dns action0)
dbus-send --system --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/AppFilter com.ctc.igd1.ObjectManager.RemoveAllObjects
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter/index_xxxx_1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.AppFilter "{'AppId':<'aa'>,'Enable':<boolean true>,'Name':<'filter test'>,'Mode':<byte 0x0>,'DomainList':<['URL2']>,'DestIPList':<['IP2_Mask', 'IP1']>,'MACList':<['11xxxxxxxxxx']>,'DomainAction':<byte 0x0>,'DestIPAction':<byte 0x0>,'SignalEnable':<boolean false>}"
备注:Name属性值可以加空格('Name':<'filter test'>)。
需要将上述MACList地址改为PC1的MAC
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter -m com.ctc.igd1.ObjectManager.GetManagedObjects
预期结果:
各属性值均设置成功
实际结果:
name属性未设置成功
- gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter -m com.ctc.igd1.ObjectManager.AddObject
,'Name':<'filter test'>,'Mode':<byte 0x0>,'DomainList':<['qq.com']>,'DestIPList':<['220.181.38.1/24', '223.5.5.5']>,'MACList':<['94C691883FB2']>,'DomainAction':<byte 0x0>,'DestIPAction':<byte 0x0>,'SignalEnable':<boolean false>}"(objectpath '/com/ctc/igd1/AppFilter/1',) - gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.AppFilter "{'AppId':<'aa'>,'Enable':<boolean true>,'Name':<'filter
test'>,'Mode':<byte 0x0>,'DomainList':<['qq.com']>,'DestIPList':<['220.181.38.1/24', '223.5.5.5']>,'MACList':<['94C691883FB2']>,'DomainAction':<byte 0x0>,'DestIPAction':<byte 0
x0>,'SignalEnable':<boolean false>}"
() - gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter -m com.ctc.igd1.ObjectManager.GetManagedObjects
({objectpath '/com/ctc/igd1/AppFilter/1': {'com.ctc.igd1.AppFilter': {'AppId': <'aa'>, 'Enable': <true>, 'Name': <''>, 'Mode': <byte 0x00>, 'DomainList': <['qq.com']>, 'DestIPList': <['220.181.38.1/24', '223.5.5.5']>, 'MACList': <['94C691883FB2']>, 'DomainAction': <byte 0x00>, 'DestIPAction': <byte 0x00>, 'WeekDays': <''>, 'Time': <''>, 'BlockedTimes': <uint32 0>, 'SignalEnable': <false>}}},)