platform: create id-only objects for deleting qdisc/tfilter in event_valid_msg()

It does not matter too much, but the code optimizes for deletion events.
In that case, we don't require parsing the full netlink message.
Instead, it's enough to parse only the ID part so that we can find the
object in the cache that is to be removed removed.

Fix that for qdisc/tfilter objects.
This commit is contained in:
Thomas Haller 2019-02-20 12:03:52 +01:00
parent e43d1d90f3
commit 7bb6433214

View file

@ -5365,7 +5365,9 @@ event_valid_msg (NMPlatform *platform, struct nl_msg *msg, gboolean handle_event
if (NM_IN_SET (msghdr->nlmsg_type, RTM_DELLINK,
RTM_DELADDR,
RTM_DELROUTE)) {
RTM_DELROUTE,
RTM_DELQDISC,
RTM_DELTFILTER)) {
/* The event notifies about a deleted object. We don't need to initialize all
* fields of the object. */
is_del = TRUE;