diff options
author | Tom Gundersen <teg@jklm.no> | 2015-03-13 16:13:24 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-03-13 16:13:24 +0100 |
commit | f436aa11f72e69e7b19cb4d73c78716296e3e417 (patch) | |
tree | 64af3032554b1f0f7ad8a0aede94c6355cda2e5c /src/libsystemd/sd-rtnl/sd-rtnl.c | |
parent | 3f42446d286a12292f1693d5cf9cb3ec3844e1a4 (diff) |
sd-rtnl: process - only apply matches to broadcast messages
Diffstat (limited to 'src/libsystemd/sd-rtnl/sd-rtnl.c')
-rw-r--r-- | src/libsystemd/sd-rtnl/sd-rtnl.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c index c7a36b9efb..50162c3ee9 100644 --- a/src/libsystemd/sd-rtnl/sd-rtnl.c +++ b/src/libsystemd/sd-rtnl/sd-rtnl.c @@ -428,9 +428,6 @@ 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) @@ -495,13 +492,15 @@ static int process_running(sd_rtnl *rtnl, sd_rtnl_message **ret) { if (!m) goto null_message; - r = process_reply(rtnl, m); - if (r != 0) - goto null_message; - - r = process_match(rtnl, m); - if (r != 0) - goto null_message; + if (sd_rtnl_message_is_broadcast(m)) { + r = process_match(rtnl, m); + if (r != 0) + goto null_message; + } else { + r = process_reply(rtnl, m); + if (r != 0) + goto null_message; + } if (ret) { *ret = m; |