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 committed by Michael Stapelberg
parent c4d774fc49
commit d46a80e963
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: