From: Yedaya Katsman Date: Mon, 6 May 2024 18:42:56 +0000 (+0300) Subject: ip: Add missing options to route get help output X-Git-Tag: v6.9.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9eab8973ccfcd6e1cf8e46343e00b484b25661a;p=thirdparty%2Fiproute2.git 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. Signed-off-by: Yedaya Katsman Signed-off-by: Stephen Hemminger --- diff --git a/ip/iproute.c b/ip/iproute.c index 73dbab48..b5304611 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 10387bca..df49f8b0 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