mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 22:56:42 +07:00
macsec: fix netlink attribute validation
macsec_validate_attr should check IFLA_MACSEC_REPLAY_PROTECT (not
IFLA_MACSEC_PROTECT) to verify that the replay protection and replay
window arguments are correct.
Fixes: c09440f7dc
("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
748164802c
commit
4b1fb9352f
@ -3147,8 +3147,8 @@ static int macsec_validate_attr(struct nlattr *tb[], struct nlattr *data[])
|
||||
nla_get_u8(data[IFLA_MACSEC_VALIDATION]) > MACSEC_VALIDATE_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
if ((data[IFLA_MACSEC_PROTECT] &&
|
||||
nla_get_u8(data[IFLA_MACSEC_PROTECT])) &&
|
||||
if ((data[IFLA_MACSEC_REPLAY_PROTECT] &&
|
||||
nla_get_u8(data[IFLA_MACSEC_REPLAY_PROTECT])) &&
|
||||
!data[IFLA_MACSEC_WINDOW])
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user