From 79db311e89d8f662300e3bd62c7386428fb0a430 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Thu, 2 Jul 2020 12:16:52 +0800 Subject: [PATCH] macsec_linux: Fix receive-lowest-PN setting Setting of the PN for the receive SA failed because the SCI wasn't provided. Fix this by adding the needed attribute to the command. Signed-off-by: Ze Gan --- src/drivers/driver_macsec_linux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/driver_macsec_linux.c b/src/drivers/driver_macsec_linux.c index 36a0757fe..3dba13ce7 100644 --- a/src/drivers/driver_macsec_linux.c +++ b/src/drivers/driver_macsec_linux.c @@ -712,6 +712,9 @@ static int macsec_drv_set_receive_lowest_pn(void *priv, struct receive_sa *sa) if (!msg) return ret; + if (nla_put_rxsc_config(msg, mka_sci_u64(&sa->sc->sci))) + goto nla_put_failure; + nest = nla_nest_start(msg, MACSEC_ATTR_SA_CONFIG); if (!nest) goto nla_put_failure;