Re: [PATCH net 06/16] can: add missing attribute validation for termination

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 03/03/2020 06.05, Jakub Kicinski wrote:
Add missing attribute validation for IFLA_CAN_TERMINATION
to the netlink policy.

Fixes: 12a6075cabc0 ("can: dev: add CAN interface termination API")
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
---
CC: Wolfgang Grandegger <wg@xxxxxxxxxxxxxx>
CC: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
CC: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
CC: linux-can@xxxxxxxxxxxxxxx
---
  drivers/net/can/dev.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 6ee06a49fb4c..68834a2853c9 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -883,6 +883,7 @@ static const struct nla_policy can_policy[IFLA_CAN_MAX + 1] = {
  				= { .len = sizeof(struct can_bittiming) },
  	[IFLA_CAN_DATA_BITTIMING_CONST]
  				= { .len = sizeof(struct can_bittiming_const) },
+	[IFLA_CAN_TERMINATION]	= { .type = NLA_U16 },
  };
static int can_validate(struct nlattr *tb[], struct nlattr *data[],

Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>

Thanks Jakub for catching all these missing defs!

Best regards,
Oliver



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux