|
|
|
@ -281,21 +281,28 @@ static int srvc_read_cb(struct ipa_client_conn *conn, struct msgb *msg) |
|
|
|
|
if (msgb_length(msg) < sizeof(*hh)) |
|
|
|
|
goto invalid; |
|
|
|
|
msg->l2h = &hh->data[0]; |
|
|
|
|
if (hh->proto != IPAC_PROTO_OSMO) |
|
|
|
|
goto invalid; |
|
|
|
|
if (!he || msgb_l2len(msg) < sizeof(*he)) |
|
|
|
|
goto invalid; |
|
|
|
|
msg->l2h = &he->data[0]; |
|
|
|
|
|
|
|
|
|
if (he->proto != IPAC_PROTO_EXT_RSPRO) |
|
|
|
|
goto invalid; |
|
|
|
|
|
|
|
|
|
printf("Received RSPRO %s\n", msgb_hexdump(msg)); |
|
|
|
|
pdu = rspro_dec_msg(msg); |
|
|
|
|
if (!pdu) |
|
|
|
|
switch (hh->proto) { |
|
|
|
|
case IPAC_PROTO_OSMO: |
|
|
|
|
if (!he || msgb_l2len(msg) < sizeof(*he)) |
|
|
|
|
goto invalid; |
|
|
|
|
msg->l2h = &he->data[0]; |
|
|
|
|
switch (he->proto) { |
|
|
|
|
case IPAC_PROTO_EXT_RSPRO: |
|
|
|
|
printf("Received RSPRO %s\n", msgb_hexdump(msg)); |
|
|
|
|
pdu = rspro_dec_msg(msg); |
|
|
|
|
if (!pdu) |
|
|
|
|
goto invalid; |
|
|
|
|
rc = srvc->handle_rx(srvc, pdu); |
|
|
|
|
ASN_STRUCT_FREE(asn_DEF_RsproPDU, pdu); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
goto invalid; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
goto invalid; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
rc = srvc->handle_rx(srvc, pdu); |
|
|
|
|
return rc; |
|
|
|
|
|
|
|
|
|
invalid: |
|
|
|
|