Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/14013


Change subject: osmux: Fix reception of legacy dummy payloads
......................................................................

osmux: Fix reception of legacy dummy payloads

Size check had a bug. Take the opportunity to print wrong frames on
error.

Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/13/14013/1

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index ce89df1..9c3844f 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -348,9 +348,9 @@
 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;
        }


--
To view, visit https://gerrit.osmocom.org/14013
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f0d4e28a2019c7ad94344f2c34d17c365bebea9
Gerrit-Change-Number: 14013
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>

Reply via email to