summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-23 17:51:20 +0100
committerTom Gundersen <teg@jklm.no>2014-03-23 17:51:23 +0100
commita212d0dadd1e5e7bc0a57b8dfe2feb9111db2678 (patch)
treec19d509674c7f313fbc4e4088d074fd0fccb2150 /src
parent374c356979ba7222fa7e09005824fe6996b0e91e (diff)
sd-rtnl: message - don't skip parts of message when parsing
If a message type occurs repeatedly let the last one win. Also, don't skip type == MAX. Based on patch from: Susant Sahani <susant@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index e243c7b075..56fb68f39d 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1016,7 +1016,7 @@ int rtnl_message_parse(sd_rtnl_message *m,
for (; RTA_OK(rta, rt_len); rta = RTA_NEXT(rta, rt_len)) {
type = rta->rta_type;
- if (type < max && !tb[type])
+ if (type <= max)
tb[type] = (uint8_t *) rta - (uint8_t *) m->hdr;
}