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:
parent
5757b12744
commit
5377138917
|
@ -112,6 +112,7 @@ func (e *Payload) unmarshal(data []byte) error {
|
||||||
e.DestRegister = ad.Uint32()
|
e.DestRegister = ad.Uint32()
|
||||||
case unix.NFTA_PAYLOAD_SREG:
|
case unix.NFTA_PAYLOAD_SREG:
|
||||||
e.SourceRegister = ad.Uint32()
|
e.SourceRegister = ad.Uint32()
|
||||||
|
e.OperationType = PayloadWrite
|
||||||
case unix.NFTA_PAYLOAD_BASE:
|
case unix.NFTA_PAYLOAD_BASE:
|
||||||
e.Base = PayloadBase(ad.Uint32())
|
e.Base = PayloadBase(ad.Uint32())
|
||||||
case unix.NFTA_PAYLOAD_OFFSET:
|
case unix.NFTA_PAYLOAD_OFFSET:
|
||||||
|
|
Loading…
Reference in New Issue