summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cnat/cnat_api.c')
-rw-r--r--src/plugins/cnat/cnat_api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat_api.c b/src/plugins/cnat/cnat_api.c
index 1c6ef7b6cf4..99d9c729282 100644
--- a/src/plugins/cnat/cnat_api.c
+++ b/src/plugins/cnat/cnat_api.c
@@ -67,6 +67,7 @@ cnat_endpoint_tuple_decode (const vl_api_cnat_endpoint_tuple_t * in,
if (rv)
return rv;
rv = cnat_endpoint_decode (&in->dst_ep, &out->dst_ep);
+ out->ep_flags = in->flags;
return rv;
}
@@ -95,6 +96,7 @@ vl_api_cnat_translation_update_t_handler (vl_api_cnat_translation_update_t
u8 flags;
int rv = 0;
u32 pi, n_paths;
+ cnat_lb_type_t lb_type;
rv = ip_proto_decode (mp->translation.ip_proto, &ip_proto);
@@ -119,7 +121,9 @@ vl_api_cnat_translation_update_t_handler (vl_api_cnat_translation_update_t
flags = mp->translation.flags;
if (!mp->translation.is_real_ip)
flags |= CNAT_FLAG_EXCLUSIVE;
- id = cnat_translation_update (&vip, ip_proto, paths, flags);
+
+ lb_type = (cnat_lb_type_t) mp->translation.lb_type;
+ id = cnat_translation_update (&vip, ip_proto, paths, flags, lb_type);
vec_free (paths);
@@ -172,12 +176,14 @@ cnat_translation_send_details (u32 cti, void *args)
mp->translation.id = clib_host_to_net_u32 (cti);
cnat_endpoint_encode (&ct->ct_vip, &mp->translation.vip);
mp->translation.ip_proto = ip_proto_encode (ct->ct_proto);
+ mp->translation.lb_type = (vl_api_cnat_lb_type_t) ct->lb_type;
path = mp->translation.paths;
vec_foreach (trk, ct->ct_paths)
{
cnat_endpoint_encode (&trk->ct_ep[VLIB_TX], &path->dst_ep);
cnat_endpoint_encode (&trk->ct_ep[VLIB_RX], &path->src_ep);
+ path->flags = trk->ct_flags;
path++;
}