diff options
author | Eric Dumazet <edumazet@google.com> | 2023-12-04 09:19:07 +0000 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2023-12-06 16:50:26 +0000 |
commit | a043bea7500269c718ec105149fb828d608edd20 (patch) | |
tree | aa350feda885503bdfc055e188e95effe267b349 | |
parent | f441c022218f6a3526e0bd5140229ea2919ee35c (diff) | |
download | iproute2-a043bea7500269c718ec105149fb828d608edd20.tar.gz |
ip route: add support for TCP usec TS
linux-6.7 got support for TCP usec resolution timestamps,
using one bit in the features mask : RTAX_FEATURE_TCP_USEC_TS.
ip route add 10/8 ... features tcp_usec_ts
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r-- | ip/iproute.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ip/iproute.c b/ip/iproute.c index fdf1f9a9d..73dbab48a 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -351,6 +351,11 @@ static void print_rtax_features(FILE *fp, unsigned int features) features &= ~RTAX_FEATURE_ECN; } + if (features & RTAX_FEATURE_TCP_USEC_TS) { + print_null(PRINT_ANY, "tcp_usec_ts", "tcp_usec_ts ", NULL); + features &= ~RTAX_FEATURE_TCP_USEC_TS; + } + if (features) print_0xhex(PRINT_ANY, "features", "%#llx ", of); @@ -1349,6 +1354,8 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv) if (strcmp(*argv, "ecn") == 0) features |= RTAX_FEATURE_ECN; + else if (strcmp(*argv, "tcp_usec_ts") == 0) + features |= RTAX_FEATURE_TCP_USEC_TS; else invarg("\"features\" value not valid\n", *argv); break; |