Skip to content

Commit 1968a0b

Browse files
qsndavem330
authored andcommitted
macsec: fix netlink attribute for key id
In my last commit I replaced MACSEC_SA_ATTR_KEYID by MACSEC_SA_ATTR_KEY. Fixes: 8acca6a ("macsec: key identifier is 128 bits, not 64") Signed-off-by: Sabrina Dubroca <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f86911e commit 1968a0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/macsec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ static int macsec_add_rxsa(struct sk_buff *skb, struct genl_info *info)
16461646
if (tb_sa[MACSEC_SA_ATTR_ACTIVE])
16471647
rx_sa->active = !!nla_get_u8(tb_sa[MACSEC_SA_ATTR_ACTIVE]);
16481648

1649-
nla_memcpy(rx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEY], MACSEC_KEYID_LEN);
1649+
nla_memcpy(rx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEYID], MACSEC_KEYID_LEN);
16501650
rx_sa->sc = rx_sc;
16511651
rcu_assign_pointer(rx_sc->sa[assoc_num], rx_sa);
16521652

@@ -1785,7 +1785,7 @@ static int macsec_add_txsa(struct sk_buff *skb, struct genl_info *info)
17851785
return -ENOMEM;
17861786
}
17871787

1788-
nla_memcpy(tx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEY], MACSEC_KEYID_LEN);
1788+
nla_memcpy(tx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEYID], MACSEC_KEYID_LEN);
17891789

17901790
spin_lock_bh(&tx_sa->lock);
17911791
tx_sa->next_pn = nla_get_u32(tb_sa[MACSEC_SA_ATTR_PN]);

0 commit comments

Comments
 (0)