diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-20 12:03:52 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-22 10:06:35 +0100 |
commit | 7bb6433214204c23b8c5a482424f77bd1e7d3c90 (patch) | |
tree | 48368d0324c0e2e15cb943630cbed4684287688d | |
parent | e43d1d90f324197daca6d03f638f9ece3f563325 (diff) | |
download | NetworkManager-7bb6433214204c23b8c5a482424f77bd1e7d3c90.tar.gz |
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.
-rw-r--r-- | src/platform/nm-linux-platform.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 4582478524..3370620e3a 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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; |