Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
145e330
)
udp: fix UDP socket byte order in lookup
32/25732/4
author
Andreas Schultz
<andreas.schultz@travelping.com>
Mon, 9 Mar 2020 10:36:15 +0000
(11:36 +0100)
committer
Florin Coras
<florin.coras@gmail.com>
Mon, 9 Mar 2020 14:36:20 +0000
(14:36 +0000)
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
src/vnet/udp/udp.c
patch
|
blob
|
history
diff --git
a/src/vnet/udp/udp.c
b/src/vnet/udp/udp.c
index
7fceab0
..
34cebec
100644
(file)
--- 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;