Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word
@ 2026-11-24  6:01 Dave Seddon
  2026-12-01 19:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Seddon @ 2026-11-24  6:01 UTC (permalink / raw)
  To: netdev; +Cc: Dave Seddon, Stephen Hemminger, David Ahern, Eyal Birger

parse_encap_xfrm() consumes every word after "encap xfrm" and drops the
route options that follow without an error:

  ip route add 198.51.100.0/24 dev lo encap xfrm if_id 7 table 100 metric 7

adds the route to table main with no metric. Break at the first unknown
word, as the other encap parsers do.

Fixes: 75776cf2472d ("ip: xfrm: support adding xfrm metadata as lwtunnel info in routes")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
---
 ip/iproute_lwtunnel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
index 9a1e747c..6b110552 100644
--- a/ip/iproute_lwtunnel.c
+++ b/ip/iproute_lwtunnel.c
@@ -2276,6 +2276,8 @@ static int parse_encap_xfrm(struct rtattr *rta, size_t len,
 			ret = rta_addattr32(rta, len, LWT_XFRM_LINK, link);
 		} else if (!strcmp(*argv, "help")) {
 			lwt_xfrm_usage();
+		} else {
+			break;
 		}
 		if (ret)
 			break;
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word
  2026-11-24  6:01 [PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word Dave Seddon
@ 2026-12-01 19:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-12-01 19:50 UTC (permalink / raw)
  To: dave seddon; +Cc: netdev, stephen, dsahern, eyal.birger

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Mon, 23 Nov 2026 22:01:41 -0800 you wrote:
> parse_encap_xfrm() consumes every word after "encap xfrm" and drops the
> route options that follow without an error:
> 
>   ip route add 198.51.100.0/24 dev lo encap xfrm if_id 7 table 100 metric 7
> 
> adds the route to table main with no metric. Break at the first unknown
> word, as the other encap parsers do.
> 
> [...]

Here is the summary with links:
  - [iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=0cb93905b49d

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] 2+ messages in thread

end of thread, other threads:[~2026-12-01 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24  6:01 [PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word Dave Seddon
2026-12-01 19:50 ` 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