aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bsc/abis_nm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 4757c7217..7f919a43b 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -29,6 +29,7 @@
#include <libgen.h>
#include <time.h>
#include <limits.h>
+#include <inttypes.h>
#include <sys/stat.h>
#include <netinet/in.h>
@@ -2662,9 +2663,7 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
DEBUGPC(DNM, "IP=%s ", inet_ntoa(addr));
}
if (TLVP_PRESENT(&tp, NM_ATT_IPACC_DST_IP_PORT))
- DEBUGPC(DNM, "PORT=%u ",
- ntohs(*((uint16_t *)
- TLVP_VAL(&tp, NM_ATT_IPACC_DST_IP_PORT))));
+ DEBUGPC(DNM, "PORT=%" SCNu16 " ", osmo_load16be(TLVP_VAL(&tp, NM_ATT_IPACC_DST_IP_PORT)));
if (TLVP_PRESENT(&tp, NM_ATT_IPACC_STREAM_ID))
DEBUGPC(DNM, "STREAM=0x%02x ",
*TLVP_VAL(&tp, NM_ATT_IPACC_STREAM_ID));