diff --git a/q_taprio.go b/q_taprio.go index 9a18926..a292094 100644 --- a/q_taprio.go +++ b/q_taprio.go @@ -59,7 +59,6 @@ func unmarshalTaPrio(data []byte, info *TaPrio) error { info.Flags = uint32Ptr(ad.Uint32()) case tcaTaPrioTxTimeDelay: info.TxTimeDelay = uint32Ptr(ad.Uint32()) - case tcaTaPrioPad: // padding does not contain data, we just skip it default: diff --git a/q_taprio_test.go b/q_taprio_test.go index 264c2e1..b4d6c6e 100644 --- a/q_taprio_test.go +++ b/q_taprio_test.go @@ -35,7 +35,8 @@ func TestTaPrio(t *testing.T) { t.Fatalf("Unexpected error: %v", err1) } val := TaPrio{} - err2 := unmarshalTaPrio(data, &val) + newData := injectAttribute(t, data, []byte{}, tcaTaPrioPad) + err2 := unmarshalTaPrio(newData, &val) if err2 != nil { if errors.Is(err2, testcase.err2) { return