[PATCH AUTOSEL 4.19 12/37] macsec: add missing attribute validation for port

From: Sasha Levin
Date: Wed Mar 18 2020 - 17:03:55 EST


From: Jakub Kicinski <kuba@xxxxxxxxxx>

[ Upstream commit 31d9a1c524964bac77b7f9d0a1ac140dc6b57461 ]

Add missing attribute validation for IFLA_MACSEC_PORT
to the netlink policy.

Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
drivers/net/macsec.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 10a8ef2d025a1..f7a6a82c9a551 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -2989,6 +2989,7 @@ static const struct device_type macsec_type = {

static const struct nla_policy macsec_rtnl_policy[IFLA_MACSEC_MAX + 1] = {
[IFLA_MACSEC_SCI] = { .type = NLA_U64 },
+ [IFLA_MACSEC_PORT] = { .type = NLA_U16 },
[IFLA_MACSEC_ICV_LEN] = { .type = NLA_U8 },
[IFLA_MACSEC_CIPHER_SUITE] = { .type = NLA_U64 },
[IFLA_MACSEC_WINDOW] = { .type = NLA_U32 },
--
2.20.1