]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
macsec_linux: Fix receive-lowest-PN setting
authorZe Gan <ganze718@gmail.com>
Thu, 2 Jul 2020 04:16:52 +0000 (12:16 +0800)
committerJouni Malinen <j@w1.fi>
Sun, 11 Oct 2020 17:35:35 +0000 (20:35 +0300)
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 <ganze718@gmail.com>
src/drivers/driver_macsec_linux.c

index 36a0757fe365e8f4f8d83ac5582b65b93cfc4465..3dba13ce7028a225659cbc22af82e0f63789df79 100644 (file)
@@ -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;