nat: Add a method to add a proper message to the queue.
This will be used by the USSD module to forward the data
without creating another copy of the data.
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index a458afd..b295f35 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -273,7 +273,11 @@
{
/* prepend the header */
ipaccess_prepend_header(msg, proto);
+ return bsc_write_msg(queue, msg);
+}
+int bsc_write_msg(struct write_queue *queue, struct msgb *msg)
+{
if (write_queue_enqueue(queue, msg) != 0) {
LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
msgb_free(msg);