The commit 6a8d90f5fe "attr: Allow attribute type 0" intended to

allow the parsing of {netlink,packet,unix}_diag, even if they are
using type 0 for valid attributes.

It lacked this part in nla_parse.

Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Samuel Gauthier 2013-11-29 09:28:44 +01:00 committed by Thomas Graf
parent 6a8d90f5fe
commit b50a36bf34

View file

@ -250,10 +250,6 @@ int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len,
nla_for_each_attr(nla, head, len, rem) {
int type = nla_type(nla);
/* Padding attributes */
if (type == 0)
continue;
if (type > maxtype)
continue;