[sccp] Use msgb->l2h instead of msgb->data for CR
Using msgb->data only works as long as msgb->data == msgb->l2h.. In
the case of receiving a MSU unit from a E1 link, or even receiving
the IPA header we will have some non SCCP data at msgb->data and then
cast garbage to what we think is making sense..
Use msgb->l2h and everything is fine.
diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c
index a199266..94fd017 100644
--- a/openbsc/src/sccp/sccp.c
+++ b/openbsc/src/sccp/sccp.c
@@ -208,7 +208,7 @@
static const u_int32_t called_offset =
offsetof(struct sccp_connection_request, variable_called);
- struct sccp_connection_request *req = (struct sccp_connection_request *)msgb->data;
+ struct sccp_connection_request *req = (struct sccp_connection_request *)msgb->l2h;
struct sccp_optional_data optional_data;
/* header check */