Commit 73a4b31
macsec: fix secy->n_rx_sc accounting
secy->n_rx_sc is supposed to be the number of _active_ rxsc's within a
secy. This is then used by macsec_send_sci to help decide if we should
add the SCI to the header or not.
This logic is currently broken when we create a new RXSC and turn it
off at creation, as create_rx_sc always sets ->active to true (and
immediately uses that to increment n_rx_sc), and only later
macsec_add_rxsc sets rx_sc->active.
Fixes: c09440f ("macsec: introduce IEEE 802.1AE driver")
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>1 parent 93a3094 commit 73a4b31
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | | - | |
| 1416 | + | |
| 1417 | + | |
1417 | 1418 | | |
1418 | 1419 | | |
1419 | 1420 | | |
| |||
1437 | 1438 | | |
1438 | 1439 | | |
1439 | 1440 | | |
1440 | | - | |
| 1441 | + | |
1441 | 1442 | | |
1442 | 1443 | | |
1443 | 1444 | | |
| |||
1876 | 1877 | | |
1877 | 1878 | | |
1878 | 1879 | | |
| 1880 | + | |
1879 | 1881 | | |
1880 | 1882 | | |
1881 | 1883 | | |
| |||
1897 | 1899 | | |
1898 | 1900 | | |
1899 | 1901 | | |
1900 | | - | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
1901 | 1906 | | |
1902 | 1907 | | |
1903 | 1908 | | |
1904 | 1909 | | |
1905 | 1910 | | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | 1911 | | |
1910 | 1912 | | |
1911 | 1913 | | |
| |||
0 commit comments