mirror of
https://github.com/vishvananda/netlink.git
synced 2025-10-05 07:46:51 +08:00
Fix: Do not crash when enumerating tc filters with unknown actionType
for example actionType "vlan" #987
This commit is contained in:

committed by
Alessandro Boch

parent
92645823f3
commit
0cd1f7961c
@@ -920,9 +920,11 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) {
|
|||||||
actionnStatistic = (*ActionStatistic)(s)
|
actionnStatistic = (*ActionStatistic)(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
action.Attrs().Statistics = actionnStatistic
|
if action != nil {
|
||||||
action.Attrs().Timestamp = actionTimestamp
|
action.Attrs().Statistics = actionnStatistic
|
||||||
actions = append(actions, action)
|
action.Attrs().Timestamp = actionTimestamp
|
||||||
|
actions = append(actions, action)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return actions, nil
|
return actions, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user