Subject: [PATCH 0/1] macsec: reflect the master interface state

From: Radu Rendec <[email-masked]>
Date: Tue, 18 Sep 2018 20:16:11 -0400

Hi everyone,

I came across an issue with macsec interfaces where they don't reflect
the master interface state. On one hand you cannot set the macsec
interface link state to up unless the master interface is already up,
but on the other hand, if the master interface goes down while the
macsec interface is already up, the macsec interface stays up.

This may also be problematic if macsec interfaces are used as bridge
ports (probably not very usual, but that is my use case anyway). In that
case the bridge has no idea of the link state of the real device, since
it only sees the macsec interface, which is always up.

I'm proposing the attached patch, which is heavily inspired from the
vlan (802.1q) driver. However, in the case of macsec, there is no
concept of "loose binding" and the state is always reflected.

I tested the patch on x86_64, but I guess it's pretty much architecture
independent.

Any comments or suggestions are welcome. Thanks!

Radu Rendec (1):
  macsec: reflect the master interface state

 drivers/net/macsec.c | 57 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 46 insertions(+), 11 deletions(-)

-- 
2.17.1