chiark / gitweb /
sd-rtnl: message - don't log about out-of-range attribute types
authorTom Gundersen <teg@jklm.no>
Fri, 28 Mar 2014 18:11:15 +0000 (19:11 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 28 Mar 2014 18:16:21 +0000 (19:16 +0100)
We will easily get these when running on newer kernels. However, we can safely ignore them as we
anyway don't know what to do with them.

src/libsystemd/sd-rtnl/rtnl-message.c

index 4c746f9d8afe9294233af1777f572b3145d62413..cfce7659aae85c08aadfcfa5996f8b56b03607b8 100644 (file)
@@ -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");