diff --git a/q_netem.go b/q_netem.go index b4a9ab1..6474bb2 100644 --- a/q_netem.go +++ b/q_netem.go @@ -216,7 +216,7 @@ func marshalNetem(info *Netem) ([]byte, error) { multiError = concatError(multiError, err) options = append(options, tcOption{Interpretation: vtBytes, Type: tcaNetemSlot, Data: data}) } - if info.PrngSeed !=nil { + if info.PrngSeed != nil { options = append(options, tcOption{Interpretation: vtUint64, Type: tcaNetemPrngSeed, Data: *info.PrngSeed}) } diff --git a/q_netem_test.go b/q_netem_test.go index 9a46fb7..5de426b 100644 --- a/q_netem_test.go +++ b/q_netem_test.go @@ -25,7 +25,7 @@ func TestNetem(t *testing.T) { "simple": {val: Netem{Ecn: uint32Ptr(123), Latency64: int64Ptr(-4242), Jitter64: int64Ptr(-1337)}}, "qopt": {val: Netem{Qopt: NetemQopt{Latency: 42}, Rate64: uint64Ptr(1337)}}, "random": {val: Netem{Corr: &NetemCorr{Delay: 2}, Reorder: &NetemReorder{Correlation: 13}, Corrupt: &NetemCorrupt{Correlation: 11}, Rate: &NetemRate{PacketOverhead: 1337}, Slot: &NetemSlot{MinDelay: 2, MaxDelay: 4}}}, - "prngseed": {val: Netem{Qopt: NetemQopt{Latency: 42}, Rate64: uint64Ptr(1337), PrngSeed: uint64Ptr(31337)}}, + "prngseed": {val: Netem{Qopt: NetemQopt{Latency: 42}, Rate64: uint64Ptr(1337), PrngSeed: uint64Ptr(31337)}}, } for name, testcase := range tests {