mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
bridge: cfm: fix enum typo in br_cc_ccm_tx_parse
[ Upstream commitc2b2ee3625
] It appears that there is a typo in the code where the nlattr array is being parsed with policy br_cfm_cc_ccm_tx_policy, but the instance is being accessed via IFLA_BRIDGE_CFM_CC_RDI_INSTANCE, which is associated with the policy br_cfm_cc_rdi_policy. This problem was introduced by commit2be665c394
("bridge: cfm: Netlink SET configuration Interface."). Though it seems like a harmless typo since these two enum owns the exact same value (1 here), it is quite misleading hence fix it by using the correct enum IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE here. Signed-off-by: Lin Ma <linma@zju.edu.cn> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d1f1e11b3d
commit
daa24d2065
1 changed files with 1 additions and 1 deletions
|
@ -362,7 +362,7 @@ static int br_cc_ccm_tx_parse(struct net_bridge *br, struct nlattr *attr,
|
|||
|
||||
memset(&tx_info, 0, sizeof(tx_info));
|
||||
|
||||
instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_RDI_INSTANCE]);
|
||||
instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE]);
|
||||
nla_memcpy(&tx_info.dmac.addr,
|
||||
tb[IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC],
|
||||
sizeof(tx_info.dmac.addr));
|
||||
|
|
Loading…
Reference in a new issue