summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-rtnl')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c6
-rw-r--r--src/libsystemd/sd-rtnl/sd-rtnl.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 7ea68f18ae..e243c7b075 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -295,6 +295,12 @@ int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type) {
return 0;
}
+int sd_rtnl_message_is_broadcast(sd_rtnl_message *m) {
+ assert_return(m, -EINVAL);
+
+ return !m->hdr->nlmsg_pid;
+}
+
int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex) {
struct ifinfomsg *ifi;
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 1b9f583726..1c2c8902f9 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -277,6 +277,9 @@ static int process_reply(sd_rtnl *rtnl, sd_rtnl_message *m) {
assert(rtnl);
assert(m);
+ if (sd_rtnl_message_is_broadcast(m))
+ return 0;
+
serial = rtnl_message_get_serial(m);
c = hashmap_remove(rtnl->reply_callbacks, &serial);
if (!c)