]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: mrp: Validate when setting the port role
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 23 Jun 2020 09:05:41 +0000 (11:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2020 21:38:05 +0000 (14:38 -0700)
commit857b4be80f5920ad0cf6e84ff0cdfbc52b43c4b9
tree20a600442e4e86d13643d03771909596ce875f31
parent0cb888d436bd2465075518da6b6ba4e3722aa71e
bridge: mrp: Validate when setting the port role

This patch adds specific checks for primary(0x0) and secondary(0x1) when
setting the port role. For any other value the function
'br_mrp_set_port_role' will return -EINVAL.

Fixes: e2eaa5ef8282c1 ("bridge: mrp: Rework the MRP netlink interface")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mrp.c