Message ID | 1456942808-15946-7-git-send-email-phil@nwl.cc |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On 16-03-02 01:19 PM, Phil Sutter wrote:
> + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n");
Dont think nat exists anymore...
cheers,
jamal
On Thu, Mar 03, 2016 at 09:21:55AM -0500, Jamal Hadi Salim wrote: > On 16-03-02 01:19 PM, Phil Sutter wrote: > > + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n"); > > Dont think nat exists anymore... But iproute2 seems to still support it? At least it's listed in rtnl_rtntype_a2n(). The entry for RTN_NAT in net/ipv4/fib_semantics.c though looks like just a stub. But at least it hasn't changed since the beginning of Git. According to ip-route.8 it's indeed non-functional. I only concerned help text and man page consistency, and since the man page lists it (with a useful hint about it's state), the help text should contain it either. Or do you think that's misleading? Thanks, Phil
On 16-03-03 10:05 AM, Phil Sutter wrote: > On Thu, Mar 03, 2016 at 09:21:55AM -0500, Jamal Hadi Salim wrote: >> On 16-03-02 01:19 PM, Phil Sutter wrote: >>> + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n"); >> >> Dont think nat exists anymore... > > But iproute2 seems to still support it? At least it's listed in > rtnl_rtntype_a2n(). > > The entry for RTN_NAT in net/ipv4/fib_semantics.c though looks like just > a stub. But at least it hasn't changed since the beginning of Git. > According to ip-route.8 it's indeed non-functional. > > I only concerned help text and man page consistency, and since the man > page lists it (with a useful hint about it's state), the help text > should contain it either. Or do you think that's misleading? > Yeah it is gone. The cloud providers i know of that needed stateless nat use tc nat. cheers, jamal
diff --git a/ip/iproute.c b/ip/iproute.c index 051fc12d197eb..5b954478cfb7f 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -82,13 +82,13 @@ static void usage(void) fprintf(stderr, "FAMILY := [ inet | inet6 | ipx | dnet | mpls | bridge | link ]\n"); fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ] [ as [ to ] ADDRESS ]\n"); fprintf(stderr, " [ rtt TIME ] [ rttvar TIME ] [ reordering NUMBER ]\n"); - fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n"); + fprintf(stderr, " [ window NUMBER ] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n"); fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n"); fprintf(stderr, " [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]\n"); fprintf(stderr, " [ features FEATURES ] [ quickack BOOL ] [ congctl NAME ]\n"); fprintf(stderr, " [ pref PREF ] [ expires TIME ]\n"); - fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n"); - fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n"); + fprintf(stderr, "TYPE := { unicast | local | broadcast | multicast | throw |\n"); + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n"); fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n"); fprintf(stderr, "SCOPE := [ host | link | global | NUMBER ]\n"); fprintf(stderr, "NHFLAGS := [ onlink | pervasive ]\n");
This is a bit pedantic, but brackets ([]) show optional values and since TYPE must not become empty, they're not suited to surround the type keyword choices. Use curly braces instead. Also add some missing whitespace to the parameter list above. Signed-off-by: Phil Sutter <phil@nwl.cc> --- ip/iproute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)