Cmp: fix accidentally hard-coded EQ operator

This commit is contained in:
Michael Stapelberg 2018-06-14 22:26:13 +02:00
parent 13709ef9a6
commit 0ba4d9997a
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ func (e *Cmp) marshal() ([]byte, error) {
}
exprData, err := netlink.MarshalAttributes([]netlink.Attribute{
{Type: unix.NFTA_CMP_SREG, Data: binaryutil.BigEndian.PutUint32(e.Register)},
{Type: unix.NFTA_CMP_OP, Data: binaryutil.BigEndian.PutUint32(unix.NFT_CMP_EQ)},
{Type: unix.NFTA_CMP_OP, Data: binaryutil.BigEndian.PutUint32(uint32(e.Op))},
{Type: unix.NLA_F_NESTED | unix.NFTA_CMP_DATA, Data: cmpData},
})
if err != nil {