mirror of
https://github.com/vishvananda/netlink.git
synced 2025-09-26 20:01:13 +08:00
Fix a panic in parseTbfData.
Include all 8 bytes when generating the native Uint64 otherwise this code may encounter an index out of range panic.
This commit is contained in:
@@ -423,7 +423,7 @@ func parseTbfData(qdisc Qdisc, data []syscall.NetlinkRouteAttr) error {
|
||||
tbf.Limit = opt.Limit
|
||||
tbf.Buffer = opt.Buffer
|
||||
case nl.TCA_TBF_RATE64:
|
||||
tbf.Rate = native.Uint64(datum.Value[0:4])
|
||||
tbf.Rate = native.Uint64(datum.Value[0:8])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user