From: Tom Gundersen Date: Wed, 29 Oct 2014 09:52:07 +0000 (+0100) Subject: sd-rtnl: mark nested attributes with the NLA_F_NESTED flag X-Git-Tag: v218~680 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=fcf81a54a4a01349cbc75a9f04d49c6084c4f624 sd-rtnl: mark nested attributes with the NLA_F_NESTED flag The kernel mostly does not check this, but let's be consisntent and allways set it anyway. Based on patch from Susant Sahani. --- diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index dac306127..ccef7165b 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -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;