gtp.c: no-op: use ntohs instead of htons

Even the operation is the same, the sin_port is in network order.

Change-Id: Iebb031debfa7706f0ab682c94492b37573ae918d
This commit is contained in:
Alexander Couzens
2025-06-04 17:36:33 +02:00
parent 90309f958a
commit 1e1a66a8f7
2 changed files with 2 additions and 2 deletions

View File

@@ -69,7 +69,7 @@
#define LOGP_WITH_ADDR(ss, level, addr, fmt, args...) \
LOGP(ss, level, "addr(%s:%d) " fmt, \
inet_ntoa((addr).sin_addr), htons((addr).sin_port), \
inet_ntoa((addr).sin_addr), ntohs((addr).sin_port), \
##args)
static const struct rate_ctr_desc gsn_ctr_description[] = {

View File

@@ -68,7 +68,7 @@
#define GTP_LOGPKG(pri, peer, pack, len, fmt, args...) \
logp2(DLGTP, pri, __FILE__, __LINE__, 0, \
"Packet from %s:%u, length: %d content: %s: " fmt, \
inet_ntoa((peer)->sin_addr), htons((peer)->sin_port), \
inet_ntoa((peer)->sin_addr), ntohs((peer)->sin_port), \
len, osmo_hexdump((const uint8_t *) pack, len), \
##args);