Compare commits
2 Commits
7c56ab800c
...
6c996cbd5f
Author | SHA1 | Date |
---|---|---|
|
6c996cbd5f | |
|
590565fb36 |
|
@ -1401,6 +1401,7 @@ func TestCtHelper(t *testing.T) {
|
|||
Obj: &expr.CtHelper{
|
||||
Name: "ftp",
|
||||
L4Proto: unix.IPPROTO_TCP,
|
||||
L3Proto: unix.NFPROTO_IPV4,
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -1431,8 +1432,13 @@ func TestCtHelper(t *testing.T) {
|
|||
t.Errorf("c.GetObject(cthelp1) failed: %v failed", err)
|
||||
}
|
||||
|
||||
if help := obj1.(*nftables.NamedObj).Obj.(*expr.CtHelper); help.L4Proto != unix.IPPROTO_TCP {
|
||||
t.Errorf("unexpected proto number: got %d, want %d", help.L4Proto, unix.IPPROTO_TCP)
|
||||
help := obj1.(*nftables.NamedObj).Obj.(*expr.CtHelper)
|
||||
if got, want := help.L4Proto, uint8(unix.IPPROTO_TCP); got != want {
|
||||
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