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.
This commit is contained in:
Rafael Campos Las Heras 2022-04-05 09:49:46 -03:00
parent 5757b12744
commit 5377138917
1 changed files with 1 additions and 0 deletions

View File

@ -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: