Index: doc/ip-cref.tex =================================================================== --- doc/ip-cref.tex.orig +++ doc/ip-cref.tex @@ -1323,6 +1323,11 @@ variable \verb|net/ipv4/tcp_reordering|. +\item \verb|fragtimeout NUMBER| + +--- \threeonly How many seconds to wait before expiring IP fragments + from the destination of this route. If not specified Linux uses + the \verb|sysctl| variable \verb|net/ipv4/ip_frag_timeout|. \item \verb|nexthop NEXTHOP| Index: ip/iproute.c =================================================================== --- ip/iproute.c.orig +++ ip/iproute.c @@ -37,7 +37,19 @@ #ifndef RTAX_RTTVAR #define RTAX_RTTVAR RTAX_HOPS #endif - +#ifndef RTAX_ADVMSS +#define RTAX_ADVMSS (RTAX_CWND+1) +#endif +#ifndef RTAX_REORDERING +#define RTAX_REORDERING (RTAX_ADVMSS+1) +#endif +#ifndef RTAX_FRAG_TIMEOUT +#define RTAX_FRAG_TIMEOUT (RTAX_REORDERING+1) +#endif +#if RTAX_MAX < RTAX_FRAG_TIMEOUT +#undef RTAX_MAX +#define RTAX_MAX RTAX_FRAG_TIMEOUT +#endif static void usage(void) __attribute__((noreturn)); @@ -58,9 +70,9 @@ fprintf(stderr, "INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...\n"); fprintf(stderr, "NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS\n"); fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n"); - fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ]\n"); + fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ] [ fragtimeout seconds]\n"); fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ ssthresh NUMBER ]\n"); - fprintf(stderr, " [ realms REALM ]\n"); + fprintf(stderr, " [ reordering NUMBER] [ realms REALM ]\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"); @@ -497,6 +509,7 @@ "cwnd", "advmss", "reordering", + "fragtimeout", }; static int hz; if (mxrta[i] == NULL) @@ -764,16 +777,26 @@ invarg("\"reordering\" value is invalid\n", *argv); rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord); #endif - } else if (strcmp(*argv, "rtt") == 0) { - unsigned rtt; +#ifdef RTAX_REORDERING + } else if (matches(*argv, "reordering") == 0) { + unsigned reord; NEXT_ARG(); if (strcmp(*argv, "lock") == 0) { - mxlock |= (1<