diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-20 00:36:03 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-20 00:36:03 +0100 |
commit | e2c5028dc4ca8b3f9f4846b658a9b80ec3e70f4d (patch) | |
tree | e18e65cf9035252a977172302fd7f43a66735742 /openbsc/src/sccp | |
parent | b2abbe8a9384e1a873f8cfb135569dbcc5061d41 (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.
Diffstat (limited to 'openbsc/src/sccp')
-rw-r--r-- | openbsc/src/sccp/sccp.c | 2 |
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 */ |