This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20492 ) Change subject: pcu_sock: fix {local,remote}_port byte ordering in pcu_tx_info_ind() ...................................................................... pcu_sock: fix {local,remote}_port byte ordering in pcu_tx_info_ind() The PCUIF is a 'brilliant' protocol: some fields are expected to be in the network byte order, some in the host order. The NSVC remote address and local/remote ports is a good example: - byte order of the address must be the network order, and - byte order of the ports must be the host order. Change-Id: I383cab0b58b62734090023298da8c5a341c670d5 Fixes: I310699fabbfec4255f0474f31717f215c1201eca Related: SYS#4915 --- M src/common/pcu_sock.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/20492/1 diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 68cd039..7bb1f7b 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -330,8 +330,10 @@ for (i = 0; i < 2; i++) { nsvc = &bts->gprs.nsvc[i]; info_ind->nsvci[i] = nsvc->nsvci; - info_ind->local_port[i] = nsvc->local.u.sin.sin_port; - info_ind->remote_port[i] = nsvc->remote.u.sin.sin_port; + /* PCUIF beauty: the NSVC addresses are sent in the network byte order, + * while the port numbers need to be send in the host order. Sigh. */ + info_ind->local_port[i] = ntohs(nsvc->local.u.sin.sin_port); + info_ind->remote_port[i] = ntohs(nsvc->remote.u.sin.sin_port); switch (nsvc->remote.u.sas.ss_family) { case AF_INET: info_ind->address_type[i] = PCU_IF_ADDR_TYPE_IPV4; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20492 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I383cab0b58b62734090023298da8c5a341c670d5 Gerrit-Change-Number: 20492 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201008/eca877aa/attachment.htm>