mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
osmux: Fix reception of legacy dummy payloads
Size check had a bug. Take the opportunity to print wrong frames on error. Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9
This commit is contained in:
@@ -348,9 +348,9 @@ static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct mgcp_conn_r
|
||||
static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb *msg,
|
||||
uint8_t *osmux_cid)
|
||||
{
|
||||
if (msg->len < 1 + sizeof(osmux_cid)) {
|
||||
if (msg->len < 1 + sizeof(*osmux_cid)) {
|
||||
LOGP(DLMGCP, LOGL_ERROR,
|
||||
"Discarding truncated Osmux dummy load\n");
|
||||
"Discarding truncated Osmux dummy load: %s\n", osmo_hexdump(msg->data, msg->len));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user