🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Dave Seddon Tue, 24 Nov 2026 06:01
[PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word
#21538
Author: Dave Seddon
Date: Tue, 24 Nov 2026 06:01
31 lines
11413 bytes
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
Re: [PATCH iproute2] iproute_lwtunnel: stop encap xfrm parsing at an unknown word
#25452
Author: patchwork-bot+netdevbpf
Date: Tue, 01 Dec 2026 19:50
25 lines
8639 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads