diff mbox series

ip: Add missing options to route get help output

Message ID 20240506184255.1062-1-yedaya.ka@gmail.com (mailing list archive)
State Accepted
Commit c9eab8973ccfcd6e1cf8e46343e00b484b25661a
Delegated to: Stephen Hemminger
Headers show
Series ip: Add missing options to route get help output | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Yedaya Katsman May 6, 2024, 6:42 p.m. UTC
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.

Signed-off-by: Yedaya Katsman <yedaya.ka@gmail.com>
---
 ip/iproute.c           |  6 ++++--
 man/man8/ip-route.8.in | 16 ++++++++++++----
 2 files changed, 16 insertions(+), 6 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 7, 2024, 3:10 p.m. UTC | #1
Hello:

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

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!
diff mbox series

Patch

diff --git a/ip/iproute.c b/ip/iproute.c
index 73dbab48aa45..b53046116826 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -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);
 }
 
diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in
index 10387bca66ff..df49f8b0e3a5 100644
--- a/man/man8/ip-route.8.in
+++ b/man/man8/ip-route.8.in
@@ -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