Only use case is to allow similar behaviour to iptables
TCPMSS --clamp-mss-to-pmtu, by combining this with exthdr statement:
tcp option maxseg size set rt mtu
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
<entry>Routing nexthop</entry>
<entry>ipv4_addr/ipv6_addr</entry>
</row>
+ <row>
+ <entry>mtu</entry>
+ <entry>TCP maximum segment size of route</entry>
+ <entry>integer (16 bit)</entry>
+ </row>
</tbody>
</tgroup>
</table>
<title>change tcp mss</title>
<programlisting>
tcp option maxseg size set 1360
+# set a size based on route information:
+tcp option maxseg size set rt mtu
</programlisting>
</example>
</para>
NFT_RT_CLASSID,
NFT_RT_NEXTHOP4,
NFT_RT_NEXTHOP6,
+ NFT_RT_TCPMSS,
};
/**
rt_key : CLASSID { $$ = NFT_RT_CLASSID; }
| NEXTHOP { $$ = NFT_RT_NEXTHOP4; }
+ | MTU { $$ = NFT_RT_TCPMSS; }
;
ct_expr : CT ct_key
16 * BITS_PER_BYTE,
BYTEORDER_BIG_ENDIAN,
true),
+ [NFT_RT_TCPMSS] = RT_TEMPLATE("mtu",
+ &integer_type,
+ 2 * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN,
+ false),
};
static void rt_expr_print(const struct expr *expr, struct output_ctx *octx)