diff options
author | 2020-03-09 11:36:15 +0100 | |
---|---|---|
committer | 2020-08-13 08:12:25 +0000 | |
commit | 458ab69af324086c9d75e5564a7f43f7a8a867c4 (patch) | |
tree | 3b4a2fcf9e3178823b01a2c7fc26ac7def848a32 /src/vnet/udp/udp.c | |
parent | 5d83b56e24353c0294f887674aed119c81172db2 (diff) |
udp: fix UDP socket byte order in lookup
The port registry uses host byte order for while the session API
uses network order. In a single place the conversion was missing.
Type: fix
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391
(cherry picked from commit 49a11cff8e7892858d946d3f93ae19502236c358)
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r-- | src/vnet/udp/udp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c index 5998327a9ab..fc59ca77ef4 100644 --- a/src/vnet/udp/udp.c +++ b/src/vnet/udp/udp.c @@ -86,7 +86,8 @@ udp_session_bind (u32 session_index, transport_endpoint_t * lcl) void *iface_ip; udp_dst_port_info_t *pi; - pi = udp_get_dst_port_info (um, lcl->port, lcl->is_ip4); + pi = + udp_get_dst_port_info (um, clib_net_to_host_u16 (lcl->port), lcl->is_ip4); if (pi) return -1; |