]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: delete new rxsc when offload fails
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 2 Nov 2022 21:33:13 +0000 (22:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2022 10:43:56 +0000 (10:43 +0000)
commitc327b118c8b042acbd53083cfdee75d19f73b308
treec95c91ced5ded27d235d31012216389b5c3b5962
parent01c046e88a32e61576019267fb1368a3e228218a
macsec: delete new rxsc when offload fails

Currently we get an inconsistent state:
 - netlink returns the error to userspace
 - the RXSC is installed but not offloaded

Then the device could get confused when we try to add an RXSA, because
the RXSC isn't supposed to exist.

Fixes: 98e38d6db896 ("net: macsec: hardware offloading infrastructure")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c