aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-09-19 22:27:18 -0700
committerDave Wallace <dwallacelf@gmail.com>2017-09-20 17:50:48 +0000
commit0e4956869b7b919957433f04cc8fe52a2f391251 (patch)
tree29171e94f2315f342bc3160d920b6dccfae95f0f /src/vnet/udp
parent392206e55a1cbfb0a2e03ae310a4d3953bf3f194 (diff)
session: store tep port in net order
Change-Id: Ie3a99f09f44ec081d9b88a213bdb8d987fb462de Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/udp')
-rw-r--r--src/vnet/udp/udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index fedf2cc0224..0e0336b5919 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -32,11 +32,11 @@ udp_session_bind_ip4 (u32 session_index, transport_endpoint_t * lcl)
pool_get (um->udp_listeners, listener);
memset (listener, 0, sizeof (udp_connection_t));
- listener->c_lcl_port = clib_host_to_net_u16 (lcl->port);
+ listener->c_lcl_port = lcl->port;
listener->c_lcl_ip4.as_u32 = lcl->ip.ip4.as_u32;
listener->c_transport_proto = TRANSPORT_PROTO_UDP;
- udp_register_dst_port (um->vlib_main, lcl->port, udp4_uri_input_node.index,
- 1 /* is_ipv4 */ );
+ udp_register_dst_port (um->vlib_main, clib_net_to_host_u16 (lcl->port),
+ udp4_uri_input_node.index, 1 /* is_ipv4 */ );
return 0;
}
@@ -47,10 +47,10 @@ udp_session_bind_ip6 (u32 session_index, transport_endpoint_t * lcl)
udp_connection_t *listener;
pool_get (um->udp_listeners, listener);
- listener->c_lcl_port = clib_host_to_net_u16 (lcl->port);
+ listener->c_lcl_port = lcl->port;
clib_memcpy (&listener->c_lcl_ip6, &lcl->ip.ip6, sizeof (ip6_address_t));
listener->c_transport_proto = TRANSPORT_PROTO_UDP;
- udp_register_dst_port (um->vlib_main, lcl->port,
+ udp_register_dst_port (um->vlib_main, clib_net_to_host_u16 (lcl->port),
udp4_uri_input_node.index, 0 /* is_ipv4 */ );
return 0;
}