From: Thomas Graf Date: Fri, 22 Feb 2008 14:20:58 +0000 (+0100) Subject: Be liberal when receiving an empty nested attribute X-Git-Tag: libnl2_0~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4be02ace482616f9d1104526dac6cde808ee24c6;p=thirdparty%2Flibnl.git Be liberal when receiving an empty nested attribute No longer enforce at least one attribute in a container of nested attributes. The application may do so itself by setting minlen to NLA_HDRLEN. --- diff --git a/lib/attr.c b/lib/attr.c index b1339de..875c881 100644 --- a/lib/attr.c +++ b/lib/attr.c @@ -522,7 +522,6 @@ static uint16_t nla_attr_minlen[NLA_TYPE_MAX+1] = { [NLA_U32] = sizeof(uint32_t), [NLA_U64] = sizeof(uint64_t), [NLA_STRING] = 1, - [NLA_NESTED] = NLA_HDRLEN, }; static int validate_nla(struct nlattr *nla, int maxtype,