Bug #3265
7.3.4基于域名或目的IP的应用阻断功能测试 步骤11DBus监控打印观察AppFilterEvent信号上报的timestamp不对
0%
Description
测试条件:
Unix时间戳转换工具:
http://www.usey.cn/timestamp
IP和域名定义
IP1: 223.5.5.5
IP2: 220.181.38.148 IP2_Mask: 220.181.38.1/24 (掩码)
URL1: news.qq.com URL1_SibLing: v.qq.com (同级子域名)
URL2: qq.com (主域名) URL2_ERR: qqerr.com (错误域名)
URL3: ifeng.com (对照域名)
步骤:
1. 验证子域名规则,并使能信号上报
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 "{'DomainList':<['URL1']>, 'DestIPList':<['IP2_Mask']>, 'SignalEnable':<boolean true>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/AppFilter -m com.ctc.igd1.ObjectManager.GetManagedObjects
登录网关执行 dbus-monitor --system&(通过DBus监控打印观察AppFilterEvent信号上报)
2. LAN端PC1命令行执行:ipconfig /flushdns && ping URL1
ping IP1
ping IP2
web浏览器访问URL2
web浏览器访问URL3,并观察信号上报,web浏览器访问URL1_SibLing;
实际结果:
DBus监控打印观察AppFilterEvent信号上报的timestamp不对
signal time=1742089467.210527 sender=:1.1 -> destination=(null destination) serial=2199 path=/com/ctc/igd1/AppFilter; interface=com.ctc.igd1.AppFilter; member=AppFilterEvent
string "9127794603070,0,192.168.1.1,i.news.qq.com,001CADF583DA"
signal time=1742089467.212769 sender=:1.1 -> destination=(null destination) serial=2200 path=/com/ctc/igd1/AppFilter; interface=com.ctc.igd1.AppFilter; member=AppFilterEvent
string "9127794626810,0,192.168.1.1,i.news.qq.com,001CADF583DA"
timestamp :9127794603070 转换成时间为2259-04-02 02:30:03
预期结果:
PC1的IP2和URL1无法ping通,且域名的返回地址解析错误, 且能观察到信号上报,信号格式符合开发规范,且path=path=/com/ctc/igd1/AppFilter 不带实例号; IP1可以ping通,web页面都可以访问