]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: restore uAPI after addition of GCM-AES-256
authorSabrina Dubroca <sd@queasysnail.net>
Thu, 18 Jan 2018 16:48:18 +0000 (17:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 20:40:16 +0000 (15:40 -0500)
commitbce771f3670a1f7a7a3cff2ef9d83a4a3ad1ed2d
treef6d573becc6cffd5a53465827018a1b93452913e
parent967967992a8bb7bcd763f6cadca13d611e5486c5
macsec: restore uAPI after addition of GCM-AES-256

Commit 743b395631f8 ("macsec: Add support for GCM-AES-256 cipher suite")
changed a few values in the uapi headers for MACsec.

Because of existing userspace implementations, we need to preserve the
value of MACSEC_DEFAULT_CIPHER_ID. Not doing that resulted in
wpa_supplicant segfaults when a secure channel was created using the
default cipher. Thus, swap MACSEC_DEFAULT_CIPHER_{ID,ALT} back to their
original values.

Changing the maximum length of the MACSEC_SA_ATTR_KEY attribute is
unnecessary, as the previous value (MACSEC_MAX_KEY_LEN, which was 128B)
is large enough to carry 32-bytes keys. This patch reverts
MACSEC_MAX_KEY_LEN to 128B and restores the old length check on
MACSEC_SA_ATTR_KEY.

Fixes: 743b395631f8 ("macsec: Add support for GCM-AES-256 cipher suite")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c
include/uapi/linux/if_macsec.h