Skip to contentSkip to conversation

ip: Add missing options to route get help output

PATCH Applied Yedaya Katsman 2 participants 2 messages May 6, 2024 – May 7, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip: Add missing options to route get help output

The "as", "to", "connected" and "notify" options were missing from the help message in the route get section. Add them to usage help and man page.

Note that there isn't an explanation for "as" or "notify" in the man page.

---
 ip/iproute.c           |  6 ++++--
 man/man8/ip-route.8.in | 16 ++++++++++++----
 2 files changed, 16 insertions(+), 6 deletions(-)
ip/iproute.c +4 -2
index 73dbab48aa45..b53046116826 100644
@@ -61,12 +61,13 @@ static void usage(void)
 		"       ip route save SELECTOR\n"
 		"       ip route restore\n"
 		"       ip route showdump\n"
-		"       ip route get [ ROUTE_GET_FLAGS ] ADDRESS\n"
+		"       ip route get [ ROUTE_GET_FLAGS ] [ to ] ADDRESS\n"
 		"                            [ from ADDRESS iif STRING ]\n"
 		"                            [ oif STRING ] [ tos TOS ]\n"
 		"                            [ mark NUMBER ] [ vrf NAME ]\n"
 		"                            [ uid NUMBER ] [ ipproto PROTOCOL ]\n"
 		"                            [ sport NUMBER ] [ dport NUMBER ]\n"
+		"                            [ as ADDRESS ]\n"
 		"       ip route { add | del | change | append | replace } ROUTE\n"
 		"SELECTOR := [ root PREFIX ] [ match PREFIX ] [ exact PREFIX ]\n"
 		"            [ table TABLE_ID ] [ vrf NAME ] [ proto RTPROTO ]\n"
@@ -112,7 +113,8 @@ static void usage(void)
 		"FLAVOR := { psp | usp | usd | next-csid }\n"
 		"IOAM6HDR := trace prealloc type IOAM6_TRACE_TYPE ns IOAM6_NAMESPACE size IOAM6_TRACE_SIZE\n"
 		"XFRMINFO := if_id IF_ID [ link_dev LINK ]\n"
-		"ROUTE_GET_FLAGS := [ fibmatch ]\n");
+		"ROUTE_GET_FLAGS := ROUTE_GET_FLAG [ ROUTE_GET_FLAGS ]\n"
+		"ROUTE_GET_FLAG := [ connected | fibmatch | notify ]\n");
 	exit(-1);
 }
 
man/man8/ip-route.8.in +12 -4
index 10387bca66ff..df49f8b0e3a5 100644
@@ -29,6 +29,7 @@ ip-route \- routing table management
 .ti -8
 .B  ip route get
 .I ROUTE_GET_FLAGS
+.B  [ to ]
 .IR ADDRESS " [ "
 .BI from " ADDRESS " iif " STRING"
 .RB " ] [ " oif
@@ -44,7 +45,9 @@ ip-route \- routing table management
 .B  sport
 .IR NUMBER " ] [ "
 .B  dport
-.IR NUMBER " ] "
+.IR NUMBER " ] ["
+.B  as
+.IR ADDRESS " ]"
 
 .ti -8
 .BR "ip route" " { " add " | " del " | " change " | " append " | "\
@@ -263,9 +266,14 @@ throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
 
 .ti -8
 .IR ROUTE_GET_FLAGS " := "
-.BR " [ "
-.BR fibmatch
-.BR " ] "
+.IR ROUTE_GET_FLAG " [ "
+.IR ROUTE_GET_FLAGS " ] "
+
+.ti -8
+.IR ROUTE_GET_FLAG " := "
+.BR "[ "
+.BR connected " | " fibmatch " | " notify
+.BR "]"
 
 .SH DESCRIPTION
 .B ip route
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 8 lines · On Mon, 6 May 2024 21:42:56 +0300 you wrote:

The "as", "to", "connected" and "notify" options were missing from the help message in the route get section. Add them to usage help and man page.

Note that there isn't an explanation for "as" or "notify" in the man page.

[...]

Here is the summary with links:
- ip: Add missing options to route get help output

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=c9eab8973ccf

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html