summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2017-11-24 17:12:33 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-11-26 20:48:08 +0000
commit8b9a5d198cc316d36b93f19fee7a351fc3922e4a (patch)
tree5f8cf5b482c6d9795c5d523c82cc89fec16e820d /src/vnet/session/session_api.c
parent6bcac065b82ef2e48fc23db18534d9dc9a7833a1 (diff)
Fix session rule port endianness.
Change-Id: I43a7ac5b6c33810a465568d1955f400f4ef08786 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index e987854bc73..f15d2f6e830 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -834,8 +834,8 @@ vl_api_session_rule_add_del_t_handler (vl_api_session_rule_add_del_t * mp)
table_args->lcl.fp_proto = fib_proto;
table_args->rmt.fp_len = mp->rmt_plen;
table_args->rmt.fp_proto = fib_proto;
- table_args->lcl_port = clib_net_to_host_u16 (mp->lcl_port);
- table_args->rmt_port = clib_net_to_host_u16 (mp->rmt_port);
+ table_args->lcl_port = mp->lcl_port;
+ table_args->rmt_port = mp->rmt_port;
table_args->action_index = clib_net_to_host_u32 (mp->action_index);
table_args->is_add = mp->is_add;
mp->tag[sizeof (mp->tag) - 1] = 0;
@@ -879,8 +879,8 @@ send_session_rule_details4 (mma_rule_16_t * rule, u8 is_local,
clib_memcpy (rmp->rmt_ip, &match->rmt_ip, sizeof (match->rmt_ip));
rmp->lcl_plen = ip4_mask_to_preflen (&mask->lcl_ip);
rmp->rmt_plen = ip4_mask_to_preflen (&mask->rmt_ip);
- rmp->lcl_port = clib_host_to_net_u16 (match->lcl_port);
- rmp->rmt_port = clib_host_to_net_u16 (match->rmt_port);
+ rmp->lcl_port = match->lcl_port;
+ rmp->rmt_port = match->rmt_port;
rmp->action_index = clib_host_to_net_u32 (rule->action_index);
rmp->scope =
is_local ? SESSION_RULE_SCOPE_LOCAL : SESSION_RULE_SCOPE_GLOBAL;
@@ -916,8 +916,8 @@ send_session_rule_details6 (mma_rule_40_t * rule, u8 is_local,
clib_memcpy (rmp->rmt_ip, &match->rmt_ip, sizeof (match->rmt_ip));
rmp->lcl_plen = ip6_mask_to_preflen (&mask->lcl_ip);
rmp->rmt_plen = ip6_mask_to_preflen (&mask->rmt_ip);
- rmp->lcl_port = clib_host_to_net_u16 (match->lcl_port);
- rmp->rmt_port = clib_host_to_net_u16 (match->rmt_port);
+ rmp->lcl_port = match->lcl_port;
+ rmp->rmt_port = match->rmt_port;
rmp->action_index = clib_host_to_net_u32 (rule->action_index);
rmp->scope =
is_local ? SESSION_RULE_SCOPE_LOCAL : SESSION_RULE_SCOPE_GLOBAL;