]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
attr: nla_is_nested() must access nla_type directly
authorThomas Graf <tgraf@suug.ch>
Sun, 28 Apr 2013 08:23:28 +0000 (10:23 +0200)
committerThomas Graf <tgraf@suug.ch>
Sun, 28 Apr 2013 08:23:28 +0000 (10:23 +0200)
Can't used nla_type() as it applies NLA_TYPE_MASK first

Signed-off-by: Thomas Graf <tgraf@suug.ch>
lib/attr.c

index e6efe4ee5ffa62f0f7d24508acf9bf1283f5ef86..14552c6d936202f625cbbd56bff089a5b938f716 100644 (file)
@@ -899,7 +899,7 @@ int nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla,
  */
 int nla_is_nested(struct nlattr *attr)
 {
-       return !!(nla_type(attr) & NLA_F_NESTED);
+       return !!(nla->nla_type & NLA_F_NESTED);
 }
 
 /** @} */