aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2022-05-05 06:07:20 +0000
committerNeale Ranns <neale@graphiant.com>2022-08-11 00:09:43 +0000
commit9fac9c8fd53b1f6d60e5de9f980cc5bfe391dc94 (patch)
tree23c935ef443f36b0c984db5277b24bc6fc1c091e /src
parent7e6ffba672875f1070348753890d023695d73be6 (diff)
tunnel: Fix API encoding of tunnel flags
Type: fix API and internal flags do not match 1:1. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I0f4e53b2e071d1c9fffd1b97bf28b4789887b032
Diffstat (limited to 'src')
-rw-r--r--src/vnet/tunnel/tunnel_types_api.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/tunnel/tunnel_types_api.c b/src/vnet/tunnel/tunnel_types_api.c
index 894eecb8407..247c13cd416 100644
--- a/src/vnet/tunnel/tunnel_types_api.c
+++ b/src/vnet/tunnel/tunnel_types_api.c
@@ -60,9 +60,14 @@ tunnel_flags_decode (vl_api_tunnel_flags_t f, tunnel_flags_t *o)
}
vl_api_tunnel_flags_t
-tunnel_flags_encode (tunnel_flags_t f)
+tunnel_flags_encode (tunnel_flags_t in)
{
- return ((vl_api_tunnel_flags_t) f);
+ vl_api_tunnel_flags_t out = 0;
+
+ if (in & TUNNEL_FLAG_TRACK_MTU)
+ out |= TUNNEL_API_FLAG_TRACK_MTU;
+
+ return (out);
}
int