* [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames
@ 2026-07-26 6:26 David Corvaglia
2026-07-26 9:39 ` Nikolay Aleksandrov
2026-07-27 23:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: David Corvaglia @ 2026-07-26 6:26 UTC (permalink / raw)
To: Nikolay Aleksandrov, Ido Schimmel, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, bridge, netdev, linux-kernel, David Corvaglia
oui is a pointer, so sizeof(oui) is the pointer size. The MRA
Option TLV thus advertises a wrong length (15 vs 10 on x86_64),
causing misparsing of the frame on peers. Fix is to replace
with sizeof(*oui).
Fixes: f7458934b079 ("net: bridge: mrp: Update the Test frames for MRA")
Signed-off-by: David Corvaglia <david@corvaglia.dev>
---
v2: target net and add Fixes header
v1: https://lore.kernel.org/bridge/20260724051202.61946-1-david@corvaglia.dev/
---
net/bridge/br_mrp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c
index 3f7126a7d720..179d2470b724 100644
--- a/net/bridge/br_mrp.c
+++ b/net/bridge/br_mrp.c
@@ -215,7 +215,7 @@ static struct sk_buff *br_mrp_alloc_test_skb(struct br_mrp *mrp,
struct br_mrp_oui_hdr *oui = NULL;
u8 length;
- length = sizeof(*sub_opt) + sizeof(*sub_tlv) + sizeof(oui) +
+ length = sizeof(*sub_opt) + sizeof(*sub_tlv) + sizeof(*oui) +
MRP_OPT_PADDING;
br_mrp_skb_tlv(skb, BR_MRP_TLV_HEADER_OPTION, length);
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames
2026-07-26 6:26 [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames David Corvaglia
@ 2026-07-26 9:39 ` Nikolay Aleksandrov
2026-07-27 23:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2026-07-26 9:39 UTC (permalink / raw)
To: David Corvaglia
Cc: Ido Schimmel, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, bridge, netdev, linux-kernel
On Sun, Jul 26, 2026 at 06:26:05AM +0000, David Corvaglia wrote:
> oui is a pointer, so sizeof(oui) is the pointer size. The MRA
> Option TLV thus advertises a wrong length (15 vs 10 on x86_64),
> causing misparsing of the frame on peers. Fix is to replace
> with sizeof(*oui).
>
> Fixes: f7458934b079 ("net: bridge: mrp: Update the Test frames for MRA")
> Signed-off-by: David Corvaglia <david@corvaglia.dev>
> ---
> v2: target net and add Fixes header
> v1: https://lore.kernel.org/bridge/20260724051202.61946-1-david@corvaglia.dev/
> ---
> net/bridge/br_mrp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c
> index 3f7126a7d720..179d2470b724 100644
> --- a/net/bridge/br_mrp.c
> +++ b/net/bridge/br_mrp.c
> @@ -215,7 +215,7 @@ static struct sk_buff *br_mrp_alloc_test_skb(struct br_mrp *mrp,
> struct br_mrp_oui_hdr *oui = NULL;
> u8 length;
>
> - length = sizeof(*sub_opt) + sizeof(*sub_tlv) + sizeof(oui) +
> + length = sizeof(*sub_opt) + sizeof(*sub_tlv) + sizeof(*oui) +
> MRP_OPT_PADDING;
> br_mrp_skb_tlv(skb, BR_MRP_TLV_HEADER_OPTION, length);
>
> --
> 2.55.0
>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames
2026-07-26 6:26 [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames David Corvaglia
2026-07-26 9:39 ` Nikolay Aleksandrov
@ 2026-07-27 23:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-27 23:50 UTC (permalink / raw)
To: David Corvaglia
Cc: razor, idosch, davem, edumazet, kuba, pabeni, horms, bridge,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 26 Jul 2026 06:26:05 +0000 you wrote:
> oui is a pointer, so sizeof(oui) is the pointer size. The MRA
> Option TLV thus advertises a wrong length (15 vs 10 on x86_64),
> causing misparsing of the frame on peers. Fix is to replace
> with sizeof(*oui).
>
> Fixes: f7458934b079 ("net: bridge: mrp: Update the Test frames for MRA")
> Signed-off-by: David Corvaglia <david@corvaglia.dev>
>
> [...]
Here is the summary with links:
- [net,v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames
https://git.kernel.org/netdev/net/c/5546da86894d
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:[~2026-07-27 23:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 6:26 [PATCH net v2] net: bridge: mrp: fix Option TLV length in MRP_Test frames David Corvaglia
2026-07-26 9:39 ` Nikolay Aleksandrov
2026-07-27 23:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.