summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-20 12:03:52 +0100
committerThomas Haller <thaller@redhat.com>2019-02-21 21:02:51 +0100
commit6f4cb7c11025802152248b75a02197a83e051e00 (patch)
treee6bc30add2a358fe2b6184a9338cccd2481189b2
parent6a2b11a9acee849d1f201e027b655472fb1e8a80 (diff)
downloadNetworkManager-6f4cb7c11025802152248b75a02197a83e051e00.tar.gz
platform: only create ID-only stubs 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 got removed. Fix that for qdisc/tfilter objects.
-rw-r--r--src/platform/nm-linux-platform.c4
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;