This commit is contained in:
patryk4815 2024-12-11 17:26:31 +00:00 committed by GitHub
commit 5ee2016d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -156,6 +156,9 @@ func TestMonitor(t *testing.T) {
*gotChain.Hooknum != *postrouting.Hooknum {
t.Fatal("no want chain", gotChain.Type, gotChain.Name, gotChain.Hooknum)
}
if gotRule.Table.Family != nat.Family {
t.Fatal("rule wrong family", gotRule.Table.Family, gotRule.Table.Name)
}
if len(gotRule.Exprs) != len(rule.Exprs) {
t.Fatal("no want rule")
}

View File

@ -38,7 +38,7 @@ type NFGenMsg struct {
}
func (genmsg *NFGenMsg) Decode(b []byte) {
if len(b) < 16 {
if len(b) < 4 {
return
}
genmsg.NFGenFamily = b[0]