aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat_det_in2out.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-06-03 11:47:55 +0200
committerOle Troan <ot@cisco.com>2020-06-03 11:48:50 +0200
commitec62d0a436be00bcc084a56548c8c7fa55b2cb61 (patch)
treeb80ef1eb7340165c0cabf348198e0084c36990f4 /src/plugins/nat/nat_det_in2out.c
parentbe360ee4d7d34954bd93ed852c9d7bf9109ce6fb (diff)
nat: refactor mss_clamping to not depend on snat_main_t
Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I1110e425859a4f1f07952c91b50f263cb7323836
Diffstat (limited to 'src/plugins/nat/nat_det_in2out.c')
-rw-r--r--src/plugins/nat/nat_det_in2out.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/nat/nat_det_in2out.c b/src/plugins/nat/nat_det_in2out.c
index cf50805c1a3..8628fcc42f7 100644
--- a/src/plugins/nat/nat_det_in2out.c
+++ b/src/plugins/nat/nat_det_in2out.c
@@ -26,6 +26,7 @@
#include <nat/nat.h>
#include <nat/nat_det.h>
#include <nat/nat_inlines.h>
+#include <nat/lib/nat_inlines.h>
typedef struct
{
@@ -438,7 +439,7 @@ VLIB_NODE_FN (snat_det_in2out_node) (vlib_main_t * vm,
sum0 = ip_csum_update (sum0, old_port0, new_port0,
ip4_header_t /* cheat */ ,
length /* changed member */ );
- mss_clamping (sm, tcp0, &sum0);
+ mss_clamping (sm->mss_clamping, tcp0, &sum0);
tcp0->checksum = ip_csum_fold (sum0);
}
else
@@ -611,7 +612,7 @@ VLIB_NODE_FN (snat_det_in2out_node) (vlib_main_t * vm,
sum1 = ip_csum_update (sum1, old_port1, new_port1,
ip4_header_t /* cheat */ ,
length /* changed member */ );
- mss_clamping (sm, tcp1, &sum1);
+ mss_clamping (sm->mss_clamping, tcp1, &sum1);
tcp1->checksum = ip_csum_fold (sum1);
}
else
@@ -820,7 +821,7 @@ VLIB_NODE_FN (snat_det_in2out_node) (vlib_main_t * vm,
sum0 = ip_csum_update (sum0, old_port0, new_port0,
ip4_header_t /* cheat */ ,
length /* changed member */ );
- mss_clamping (sm, tcp0, &sum0);
+ mss_clamping (sm->mss_clamping, tcp0, &sum0);
tcp0->checksum = ip_csum_fold (sum0);
}
else