]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix nla_policy_len to actually _iterate_ over the policy
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 28 Feb 2011 20:38:25 +0000 (12:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Feb 2011 20:38:25 +0000 (12:38 -0800)
commit03f8bf0351f68aef75ee2266e0ad90302cd9a380
tree69746e934e9b4cdff8ae686caafb471770755e73
parent14e2bde63f21446bc4c4fca7c6a174f91ee5d4ca
net: fix nla_policy_len to actually _iterate_ over the policy

Currently nla_policy_len always returns n * NLA_HDRLEN:
It loops, but does not advance it's iterator.
NLA_UNSPEC == 0 does not contain a .len in any policy.

Trivially fixed by adding p++.

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/nlattr.c