can: gw: Use nla_policy to validate netlink attributes
authorThomas Graf <tgraf@suug.ch>
Thu, 5 Jul 2012 12:19:56 +0000 (14:19 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 10 Jul 2012 20:35:41 +0000 (22:35 +0200)
commit732d35fd08058a678327ec908528fcc9514c9e48
treee56b55c83c7892461b9c6dc87d9ab9d124d91d7d
parent6eaf53ca7bdae4506dbe6f0daaa93656f092383e
can: gw: Use nla_policy to validate netlink attributes

Also use nla_get_u32() instead of nla_memcpy() to access u32 attribtues.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/gw.c