* [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print
@ 2023-01-19 11:53 ehakim
2023-01-20 10:48 ` Simon Horman
2023-01-25 18:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: ehakim @ 2023-01-19 11:53 UTC (permalink / raw)
To: sd; +Cc: dsahern, netdev, Emeel Hakim
From: Emeel Hakim <ehakim@nvidia.com>
Currently Macsec print routines uses a 32 bit print routine
to print out the value of the packet number (PN) attribute, a
miss use of the 32 bit print routine is causing a miss print of
only the 32 least significant bit (LSB) of an extended packet
number (XPN) which is a 64 bit attribute.
Fixes: 6ce23b7c2d79 ("macsec: add Extended Packet Number support")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
---
ip/ipmacsec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c
index 8da7c3d3..8b0d5666 100644
--- a/ip/ipmacsec.c
+++ b/ip/ipmacsec.c
@@ -938,8 +938,8 @@ static void print_tx_sc(const char *prefix, __u64 sci, __u8 encoding_sa,
print_uint(PRINT_ANY, "an", "%d:",
rta_getattr_u8(sa_attr[MACSEC_SA_ATTR_AN]));
if (is_xpn) {
- print_uint(PRINT_ANY, "pn", " PN %u,",
- rta_getattr_u64(sa_attr[MACSEC_SA_ATTR_PN]));
+ print_lluint(PRINT_ANY, "pn", " PN %llu,",
+ rta_getattr_u64(sa_attr[MACSEC_SA_ATTR_PN]));
print_0xhex(PRINT_ANY, "ssci",
"SSCI %08x",
ntohl(rta_getattr_u32(sa_attr[MACSEC_SA_ATTR_SSCI])));
@@ -1015,8 +1015,8 @@ static void print_rx_sc(const char *prefix, __be64 sci, __u8 active,
print_uint(PRINT_ANY, "an", "%u:",
rta_getattr_u8(sa_attr[MACSEC_SA_ATTR_AN]));
if (is_xpn) {
- print_uint(PRINT_ANY, "pn", " PN %u,",
- rta_getattr_u64(sa_attr[MACSEC_SA_ATTR_PN]));
+ print_lluint(PRINT_ANY, "pn", " PN %llu,",
+ rta_getattr_u64(sa_attr[MACSEC_SA_ATTR_PN]));
print_0xhex(PRINT_ANY, "ssci",
"SSCI %08x",
ntohl(rta_getattr_u32(sa_attr[MACSEC_SA_ATTR_SSCI])));
--
2.21.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print
2023-01-19 11:53 [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print ehakim
@ 2023-01-20 10:48 ` Simon Horman
2023-01-25 18:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-01-20 10:48 UTC (permalink / raw)
To: ehakim; +Cc: sd, dsahern, netdev
On Thu, Jan 19, 2023 at 01:53:02PM +0200, ehakim@nvidia.com wrote:
> From: Emeel Hakim <ehakim@nvidia.com>
>
> Currently Macsec print routines uses a 32 bit print routine
> to print out the value of the packet number (PN) attribute, a
> miss use of the 32 bit print routine is causing a miss print of
> only the 32 least significant bit (LSB) of an extended packet
> number (XPN) which is a 64 bit attribute.
>
> Fixes: 6ce23b7c2d79 ("macsec: add Extended Packet Number support")
> Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print
2023-01-19 11:53 [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print ehakim
2023-01-20 10:48 ` Simon Horman
@ 2023-01-25 18:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-25 18:30 UTC (permalink / raw)
To: Emeel Hakim; +Cc: sd, dsahern, netdev
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Thu, 19 Jan 2023 13:53:02 +0200 you wrote:
> From: Emeel Hakim <ehakim@nvidia.com>
>
> Currently Macsec print routines uses a 32 bit print routine
> to print out the value of the packet number (PN) attribute, a
> miss use of the 32 bit print routine is causing a miss print of
> only the 32 least significant bit (LSB) of an extended packet
> number (XPN) which is a 64 bit attribute.
>
> [...]
Here is the summary with links:
- [iproute2,1/1] macsec: Fix Macsec packet number attribute print
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=55738f8ee1eb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-25 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 11:53 [PATCH iproute2 1/1] macsec: Fix Macsec packet number attribute print ehakim
2023-01-20 10:48 ` Simon Horman
2023-01-25 18:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).