chiark / gitweb /
sd-rtnl: mark nested attributes with the NLA_F_NESTED flag
authorTom Gundersen <teg@jklm.no>
Wed, 29 Oct 2014 09:52:07 +0000 (10:52 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 29 Oct 2014 09:52:07 +0000 (10:52 +0100)
The kernel mostly does not check this, but let's be consisntent and allways set it anyway. Based
on patch from Susant Sahani.

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

index dac3061271c5f9f6f5f013e44f65ce345d353eb5..ccef7165b02064d9fb1000ba32f7c7b12c720c92 100644 (file)
@@ -725,7 +725,7 @@ int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type) {
         if (r < 0)
                 return r;
 
-        r = add_rtattr(m, type, NULL, size);
+        r = add_rtattr(m, type | NLA_F_NESTED, NULL, size);
         if (r < 0)
                 return r;