]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: Fix header length if SCI is added if explicitly disabled
authorTobias Brunner <tobias@strongswan.org>
Mon, 24 Oct 2016 13:44:26 +0000 (15:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Oct 2016 20:21:00 +0000 (16:21 -0400)
commitd83cddad8a400d2194d3234ed4bdc430845b5094
treedee1989eb0d3ce80167b44b12ee6c6000e26279a
parent8079fd6948453e53b9bf083b51d27e31a87f41b7
macsec: Fix header length if SCI is added if explicitly disabled

Even if sending SCIs is explicitly disabled, the code that creates the
Security Tag might still decide to add it (e.g. if multiple RX SCs are
defined on the MACsec interface).
But because the header length so far only depended on the configuration
option the SCI overwrote the original frame's contents (EtherType and
e.g. the beginning of the IP header) and if encrypted did not visibly
end up in the packet, while the SC flag in the TCI field of the Security
Tag was still set, resulting in invalid MACsec frames.

Fixes: 4f0c7417cca8 ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Tobias Brunner <tobias@strongswan.org>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c