mirror of
https://github.com/vishvananda/netlink.git
synced 2025-10-06 00:07:00 +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,10 +920,12 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) {
|
|||||||
actionnStatistic = (*ActionStatistic)(s)
|
actionnStatistic = (*ActionStatistic)(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if action != nil {
|
||||||
action.Attrs().Statistics = actionnStatistic
|
action.Attrs().Statistics = actionnStatistic
|
||||||
action.Attrs().Timestamp = actionTimestamp
|
action.Attrs().Timestamp = actionTimestamp
|
||||||
actions = append(actions, action)
|
actions = append(actions, action)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return actions, nil
|
return actions, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user