lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20479 )
Change subject: OML: corect parse the NM_ATT_OSMO_NS_LINK_CFG ...................................................................... OML: corect parse the NM_ATT_OSMO_NS_LINK_CFG The address_family is 8 bit and have a padding byte afterwards. By using osmo_load16be it's encoding it wrong and result in an empty/invalid NSVC configuration. Change-Id: Ie070b5745124d48e74a6dedd8903b74bfb3ce9d2 --- M src/common/oml.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/79/20479/1 diff --git a/src/common/oml.c b/src/common/oml.c index 1f74cac..5394e8a 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1277,12 +1277,13 @@ if (TLVP_PRES_LEN(tp, NM_ATT_OSMO_NS_LINK_CFG, 10)) { const uint8_t *cur = TLVP_VAL(tp, NM_ATT_OSMO_NS_LINK_CFG); - uint16_t address_family; + uint8_t address_family; memset(&nsvc->local, 0, sizeof(nsvc->local)); memset(&nsvc->remote, 0, sizeof(nsvc->remote)); - address_family = osmo_load16be(cur); + address_family = *cur; + /* 1byte padding */ cur += 2; memcpy(&nsvc->local.u.sin.sin_port, cur, 2); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20479 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie070b5745124d48e74a6dedd8903b74bfb3ce9d2 Gerrit-Change-Number: 20479 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lyn...@fe80.eu> Gerrit-MessageType: newchange