use msb->l2h as pointer to the RSPRO part inside msgb
Change-Id: Ib8d02047ec64178f9ee235534dab3d9bf4ead296
diff --git a/src/bankd_main.c b/src/bankd_main.c
index 0a54ee1..f888e9a 100644
--- a/src/bankd_main.c
+++ b/src/bankd_main.c
@@ -232,8 +232,10 @@
return -1;
}
+ msg->l2h = msg->data;
/* prepend the header */
ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_RSPRO);
+ ipa_prepend_header(msg, IPAC_PROTO_OSMO);
/* actually send it through the socket */
rc = write(worker->client.fd, msgb_data(msg), msgb_length(msg));
diff --git a/src/rspro_util.c b/src/rspro_util.c
index d55bd30..d6bdd0f 100644
--- a/src/rspro_util.c
+++ b/src/rspro_util.c
@@ -35,6 +35,7 @@
if (!msg)
return NULL;
+ msg->l2h = msg->data;
rval = der_encode_to_buffer(&asn_DEF_RsproPDU, pdu, msgb_data(msg), msgb_tailroom(msg));
if (rval.encoded < 0) {
fprintf(stderr, "Failed to encode %s\n", rval.failed_type->name);