Change in osmo-bsc[master]: pcu_sock: fix endianess when populating gsm_pcu_if_info_ind
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31129 ) Change subject: pcu_sock: fix endianess when populating gsm_pcu_if_info_ind ...................................................................... pcu_sock: fix endianess when populating gsm_pcu_if_info_ind The intended endienaess for the remote_port member is host byte order, while the endianess in the nsvc struct is in network byte order. (see also pcu_sock.c in osmo-bts.git) Change-Id: Ib62dcceb80fd500e477dd5e1a0e43de47e16eeb0 Related: OS#5198 --- M src/osmo-bsc/pcu_sock.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index def2df0..800b6fd 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -263,14 +263,14 @@ case AF_INET: info_ind->address_type[i] = PCU_IF_ADDR_TYPE_IPV4; info_ind->remote_ip[i].v4 = nsvc->remote.u.sin.sin_addr; - info_ind->remote_port[i] = nsvc->remote.u.sin.sin_port; + info_ind->remote_port[i] = ntohs(nsvc->remote.u.sin.sin_port); break; case AF_INET6: info_ind->address_type[i] = PCU_IF_ADDR_TYPE_IPV6; memcpy(&info_ind->remote_ip[i].v6, &nsvc->remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); - info_ind->remote_port[i] = nsvc->remote.u.sin6.sin6_port; + info_ind->remote_port[i] = ntohs(nsvc->remote.u.sin6.sin6_port); break; default: info_ind->address_type[i] = PCU_IF_ADDR_TYPE_UNSPEC; 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib62dcceb80fd500e477dd5e1a0e43de47e16eeb0 Gerrit-Change-Number: 31129 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
dexter