diff options
| author | Sabrina Dubroca <sd@queasysnail.net> | 2025-08-26 15:16:24 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-27 18:34:52 -0700 |
| commit | 82f3116132fc12d27e5a4bb7151c8da4f689a083 (patch) | |
| tree | 4409829e5920f34ed61ea7d45675c8f3a17953fe /rust/helpers/build_bug.c | |
| parent | 15a700a8429ebb2f95c009293689c3fbd2b09ebe (diff) | |
macsec: use NLA_UINT for MACSEC_SA_ATTR_PN
MACSEC_SA_ATTR_PN is either a u32 or a u64, we can now use NLA_UINT
for this instead of a custom binary type. We can then use a min check
within the policy.
We need to keep the length checks done in macsec_{add,upd}_{rx,tx}sa
based on whether the device is set up for XPN (with 64b PNs instead of
32b).
On the dump side, keep the existing custom code as userspace may
expect a u64 when using XPN, and nla_put_uint may only output a u32
attribute if the value fits.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/c9d32bd479cd4464e09010fbce1becc75377c8a0.1756202772.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions
