[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.
This commit is contained in:
Holger Hans Peter Freyther 2010-02-20 00:36:03 +01:00
parent b2abbe8a93
commit e2c5028dc4
1 changed files with 1 additions and 1 deletions

View File

@ -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 */