]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: allow empty nested attributes
authorPatrick McHardy <kaber@trash.net>
Fri, 28 Nov 2008 11:05:19 +0000 (03:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Nov 2008 11:05:19 +0000 (03:05 -0800)
commit1674f92859375c997e419796aac6a98829b157f5
tree44ca6da57e63035537d01cf58c24837067c2ec26
parent7986f9dedf02e68f8a72009ce448354a61541fb9
netlink: allow empty nested attributes

validate_nla() currently doesn't allow empty nested attributes. This
makes userspace code unnecessarily complicated when starting and ending
the nested attribute is done by generic upper level code and the inner
attributes are dumped by a module.

Add a special case to accept empty nested attributes. When the nested
attribute is non empty, the same checks as before are performed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/attr.c