summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-12-22 19:59:53 +0100
committerDaniel Mack <daniel@zonque.org>2014-12-22 19:59:53 +0100
commit856d6e09887730f115e43faf9577b479f2beb3c4 (patch)
tree0355af427c8fb87af5e193cde1761dcbaa6b8953
parente24e415e5f3af2fe86d2be9a1f1a2e8d5f8c96bf (diff)
sd-bus: ignore KDBUS_ITEM_TIMESTAMP in kernel messages
Kernel notifications carry a timestamp now, so make sure bus_kernel_translate_message() doesn't complain when it stumbles across them.
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index cdca48d92b..a69628945d 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1267,6 +1267,9 @@ static int bus_kernel_translate_message(sd_bus *bus, struct kdbus_msg *k) {
assert(k->payload_type == KDBUS_PAYLOAD_KERNEL);
KDBUS_ITEM_FOREACH(d, k, items) {
+ if (d->type == KDBUS_ITEM_TIMESTAMP)
+ continue;
+
if (d->type >= _KDBUS_ITEM_KERNEL_BASE && d->type < _KDBUS_ITEM_KERNEL_BASE + ELEMENTSOF(translate)) {
if (found)
return -EBADMSG;