mirror of
https://github.com/vishvananda/netlink
synced 2025-01-31 20:26:55 +00:00
Fix index out of range when no metadata for gretap
This commit is contained in:
parent
0e3b74dbe2
commit
12728257a9
@ -1771,7 +1771,9 @@ func parseGretapData(link Link, data []syscall.NetlinkRouteAttr) {
|
||||
case nl.IFLA_GRE_ENCAP_FLAGS:
|
||||
gre.EncapFlags = native.Uint16(datum.Value[0:2])
|
||||
case nl.IFLA_GRE_COLLECT_METADATA:
|
||||
gre.FlowBased = int8(datum.Value[0]) != 0
|
||||
if len(datum.Value) > 0 {
|
||||
gre.FlowBased = int8(datum.Value[0]) != 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user