支持连续端口,比如1234-5678

This commit is contained in:
huweishan
2024-04-08 16:13:52 +08:00
parent 38b8f0b2aa
commit 15573a6ef3
3 changed files with 38 additions and 13 deletions

View File

@@ -89,7 +89,7 @@ func checkLinkAcl(group *dbdata.Group, pl *sessdata.Payload) bool {
// 循环判断ip和端口
if v.IpNet.Contains(ipDst) {
// 放行允许ip的ping
if dbdata.ContainsInPorts( v.Ports , ipPort) || v.Ports[0] == 0 || ipProto == waterutil.ICMP {
if dbdata.ContainsInPorts( v.Ports , ipPort) || v.Ports[0].PortFrom == 0 || ipProto == waterutil.ICMP {
if v.Action == dbdata.Allow {
return true
} else {