aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-02-20 00:36:03 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-02-20 00:36:03 +0100
commite2c5028dc4ca8b3f9f4846b658a9b80ec3e70f4d (patch)
treee18e65cf9035252a977172302fd7f43a66735742
parentb2abbe8a9384e1a873f8cfb135569dbcc5061d41 (diff)
[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.
-rw-r--r--openbsc/src/sccp/sccp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c
index a19926630..94fd0175c 100644
--- a/openbsc/src/sccp/sccp.c
+++ b/openbsc/src/sccp/sccp.c
@@ -208,7 +208,7 @@ int _sccp_parse_connection_request(struct msgb *msgb, struct sccp_parse_result *
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 */