]> git.baikalelectronics.ru Git - kernel.git/commit
net: atlantic: fix the macsec key length
authorAntoine Tenart <atenart@kernel.org>
Thu, 24 Jun 2021 09:38:30 +0000 (11:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Jun 2021 19:41:13 +0000 (12:41 -0700)
commit933112d057f2f2c33bbaa9cd7765d3f442360fa2
treec7466d702d0f11a6794c53e5dc986dd08ea4ad4f
parenteddcb4d2caea3514d9cc504f6eb6396d26693dcc
net: atlantic: fix the macsec key length

The key length used to store the macsec key was set to MACSEC_KEYID_LEN
(16), which is an issue as:
- This was never meant to be the key length.
- The key length can be > 16.

Fix this by using MACSEC_MAX_KEY_LEN instead (the max length accepted in
uAPI).

Fixes: a8649f3ce2c4 ("net: atlantic: MACSec egress offload implementation")
Fixes: 86c70183493c ("net: atlantic: MACSec ingress offload implementation")
Reported-by: Lior Nahmanson <liorna@nvidia.com>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_macsec.h