Skip to content

Commit

Permalink
Fix port
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal committed Jan 23, 2025
1 parent b951fb4 commit 0837864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/firewall/uspfilter/uspfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ func validateRule(ip net.IP, packetData []byte, rules map[string]Rule, d *decode
return rule.udpHook(packetData), true
}

if portsMatch(rule.sPort, uint16(d.tcp.SrcPort)) && portsMatch(rule.dPort, uint16(d.tcp.DstPort)) {
if portsMatch(rule.sPort, uint16(d.udp.SrcPort)) && portsMatch(rule.dPort, uint16(d.udp.DstPort)) {
return rule.drop, true
}
case layers.LayerTypeICMPv4, layers.LayerTypeICMPv6:
Expand Down

0 comments on commit 0837864

Please sign in to comment.