From d46a80e963b0cf18319525d49be8ec9fa81ba283 Mon Sep 17 00:00:00 2001 From: Rafael Campos Las Heras Date: Tue, 5 Apr 2022 09:49:46 -0300 Subject: [PATCH] Fix payload unmarshall operation type. When unmarshalling the Payload expression the operation type is not updated. Apply the same logic for unmarshalling that we apply for marshalling. --- expr/payload.go | 1 + 1 file changed, 1 insertion(+) diff --git a/expr/payload.go b/expr/payload.go index f7e7957..e4bfd51 100644 --- a/expr/payload.go +++ b/expr/payload.go @@ -112,6 +112,7 @@ func (e *Payload) unmarshal(data []byte) error { e.DestRegister = ad.Uint32() case unix.NFTA_PAYLOAD_SREG: e.SourceRegister = ad.Uint32() + e.OperationType = PayloadWrite case unix.NFTA_PAYLOAD_BASE: e.Base = PayloadBase(ad.Uint32()) case unix.NFTA_PAYLOAD_OFFSET: