summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 4c746f9d8a..cfce7659aa 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -920,10 +920,11 @@ 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) {
- log_debug("rtnl: message parse - ignore out of range attribute type");
+ /* if the kernel is newer than the headers we used
+ when building, we ignore out-of-range attributes
+ */
+ if (type > max)
continue;
- }
if (tb[type])
log_debug("rtnl: message parse - overwriting repeated attribute");