fix: ipid only for tcp

This commit is contained in:
SunBK201 2025-11-21 01:27:46 +08:00
parent 16a08cb5a3
commit f366aa2ce9
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ var RuleDelTCPTS = []string{
}
var RuleIP = []string{
"-p", "tcp",
"-j", "NFQUEUE",
"--queue-num", strconv.Itoa(netfilter.HELPER_QUEUE),
"--queue-bypass",

View File

@ -114,6 +114,7 @@ func (s *Server) NftSetIP(tx *knftables.Transaction, table *knftables.Table) {
rule := &knftables.Rule{
Chain: chain.Name,
Rule: knftables.Concat(
"meta l4proto tcp",
fmt.Sprintf("counter queue num %d bypass", s.nfqServer.QueueNum),
),
}