diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-09-13 02:36:25 -0700 |
---|---|---|
committer | Matus Fabian <matfabia@cisco.com> | 2018-09-13 02:36:25 -0700 |
commit | bb4e022502dd7f76d4f1cd705a7bac628d8c098c (patch) | |
tree | e8b5f13cbea161f66aad347fc7175edabd337f72 /test/vpp_papi_provider.py | |
parent | c2b4dbe48a01e746bfa89c4208d6e6b686270ac0 (diff) |
NAT: TCP MSS clamping
NAT plugin changes the MSS value in TCP SYN packets to avoid fragmentation.
If the negotiated MSS value is greater than the configured value it is changed
to the configured value. If the negotiated MSS value is smaller than the
configured value it remains unchanged.
Change-Id: Ic3c4f94a2f1b76e2bf79f50f3ad36a4097f3f188
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 13d0d933ea1..61d80b21fb5 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -1827,6 +1827,20 @@ class VppPapiProvider(object): """Get address and port assignment algorithm""" return self.api(self.papi.nat_get_addr_and_port_alloc_alg, {}) + def nat_set_mss_clamping(self, enable=0, mss_value=1500): + """Set TCP MSS rewriting configuration + + :param enable: disable(0)/enable(1) MSS rewriting feature + :param mss_value: MSS value to be used for MSS rewriting + """ + return self.api( + self.papi.nat_set_mss_clamping, + {'enable': enable, 'mss_value': mss_value}) + + def nat_get_mss_clamping(self): + """Get TCP MSS rewriting configuration""" + return self.api(self.papi.nat_get_mss_clamping, {}) + def nat_det_close_session_out( self, out_addr, |