Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Stephen Hemminger
Mon, 30 Nov 2026 18:42
[PATCH iproute2] xfrm: report unknown object instead of usage
Author: Stephen Hemminger
Date: Mon, 30 Nov 2026 18:42
Date: Mon, 30 Nov 2026 18:42
36 lines
11660 bytes
11660 bytes
"ip xfrm <unknown>" printed the usage text and exited without saying
which object was unrecognized.
Fall through to the message for an unrecognized object and keep
usage() for the explicit help request, matching every other do_*
dispatcher in the tree.
Update the help command to match.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
ip/ipxfrm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 78d9e192..20d23ed6 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -1566,10 +1566,9 @@ int do_xfrm(int argc, char **argv)
return do_xfrm_policy(argc-1, argv+1);
else if (matches(*argv, "monitor") == 0)
return do_xfrm_monitor(argc-1, argv+1);
- else if (matches(*argv, "help") == 0) {
+ else if (matches(*argv, "help") == 0)
usage();
- fprintf(stderr, "xfrm Object \"%s\" is unknown.\n", *argv);
- exit(-1);
- }
- usage();
+
+ fprintf(stderr, "Object \"%s\" is unknown, try \"ip xfrm help\".\n", *argv);
+ exit(-1);
}
--
2.53.0
Re: [PATCH iproute2] xfrm: report unknown object instead of usage
Author: patchwork-bot+netdevbpf
Date: Mon, 30 Nov 2026 19:30
Date: Mon, 30 Nov 2026 19:30
24 lines
8464 bytes
8464 bytes
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Mon, 30 Nov 2026 10:42:37 -0800 you wrote:
> "ip xfrm <unknown>" printed the usage text and exited without saying
> which object was unrecognized.
>
> Fall through to the message for an unrecognized object and keep
> usage() for the explicit help request, matching every other do_*
> dispatcher in the tree.
>
> [...]
Here is the summary with links:
- [iproute2] xfrm: report unknown object instead of usage
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=2785659ee4ff
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