Compare commits
2 Commits
6c996cbd5f
...
7c56ab800c
Author | SHA1 | Date |
---|---|---|
|
7c56ab800c | |
|
58e70206d0 |
|
@ -1401,7 +1401,6 @@ func TestCtHelper(t *testing.T) {
|
||||||
Obj: &expr.CtHelper{
|
Obj: &expr.CtHelper{
|
||||||
Name: "ftp",
|
Name: "ftp",
|
||||||
L4Proto: unix.IPPROTO_TCP,
|
L4Proto: unix.IPPROTO_TCP,
|
||||||
L3Proto: unix.NFPROTO_IPV4,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1432,13 +1431,8 @@ func TestCtHelper(t *testing.T) {
|
||||||
t.Errorf("c.GetObject(cthelp1) failed: %v failed", err)
|
t.Errorf("c.GetObject(cthelp1) failed: %v failed", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
help := obj1.(*nftables.NamedObj).Obj.(*expr.CtHelper)
|
if help := obj1.(*nftables.NamedObj).Obj.(*expr.CtHelper); help.L4Proto != unix.IPPROTO_TCP {
|
||||||
if got, want := help.L4Proto, uint8(unix.IPPROTO_TCP); got != want {
|
t.Errorf("unexpected proto number: got %d, want %d", help.L4Proto, unix.IPPROTO_TCP)
|
||||||
t.Errorf("unexpected l4proto number: got %d, want %d", got, want)
|
|
||||||
}
|
|
||||||
|
|
||||||
if got, want := help.L3Proto, uint16(unix.NFPROTO_IPV4); got != want {
|
|
||||||
t.Errorf("unexpected l3proto number: got %d, want %d", got, want)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue