{
    "name"  : "ip session filter防护配置检查",
    "problems" : {
        "ipSession" : {
            "desc"      : "【问题】设备未配置ip session filter防护，如遇到大量的伪源IP攻击，或者是端口扫描时，会把设备的流表给占满，而导致正常的业务数据无法建流造成业务卡或中断",
            "advice"    : "【建议】请参考实施一本通配置ip session filter防攻击保护设备的正常运行"
        }
    }
}
---------------------------code-------------------------------
res = cli("show run | in ip session filter")
res = res.split(/\r?\n/)
if res.length == 2:
    add_problem("ipSession")
    return "warn"   
else:
    resTmp = res[1]
    resArr = resTmp.match(/ip session filter (.+)/)
    if resArr[1] == 0 : 
        add_problem("ipSession")
        return "warn"    
    end
end
return 'success'