daniel submitted this change.
ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload data
Previously if ih->proto was IPAC_PROTO_OSMO msg->l2h would still point
to the extension header byte which breaks assumptions in e.g. osmo-bsc.
Change-Id: Id91cddf9948ca49abf092850fae3a8f17e445b45
Related: OS#6422
---
M src/ipa.c
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/ipa.c b/src/ipa.c
index 8720427..d43df00 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -375,7 +375,8 @@
#define MSG_CB_IPA_INFO_OFFSET 0
/* Check and remove headers (in case of p == IPAC_PROTO_OSMO, also the IPA extension header).
- * Returns a negative number on error, otherwise the number of octets removed */
+ * Returns a negative number on error, otherwise the number of octets removed.
+ * Both msg->data and msg->l2h point to the user data after the (extended) IPA header if this function is successful. */
static inline int ipa_check_pull_headers(struct msgb *msg)
{
int ret;
@@ -397,6 +398,7 @@
osmo_ipa_msgb_cb_proto_ext(msg) = msg->data[0];
msgb_pull(msg, sizeof(struct ipa_head_ext));
octets_removed += sizeof(struct ipa_head_ext);
+ msg->l2h = msg->data;
return octets_removed;
}
To view, visit change 37661. To unsubscribe, or for help writing mail filters, visit settings.