mirror of https://github.com/vishvananda/netlink
Fix: Do not crash when enumerating tc filters with unknown actionType
for example actionType "vlan" #987
This commit is contained in:
parent
92645823f3
commit
0cd1f7961c
|
@ -920,9 +920,11 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) {
|
|||
actionnStatistic = (*ActionStatistic)(s)
|
||||
}
|
||||
}
|
||||
action.Attrs().Statistics = actionnStatistic
|
||||
action.Attrs().Timestamp = actionTimestamp
|
||||
actions = append(actions, action)
|
||||
if action != nil {
|
||||
action.Attrs().Statistics = actionnStatistic
|
||||
action.Attrs().Timestamp = actionTimestamp
|
||||
actions = append(actions, action)
|
||||
}
|
||||
}
|
||||
return actions, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue