From 3a77e610336f7d84c5210c9dc3cdd997c6525972 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 5 Jul 2010 13:33:18 +0800 Subject: [PATCH] nat: Keep track of the MSC handling the connection. In the future we might have multiple MSCs connected and need to dispatch it to the right one. --- openbsc/include/openbsc/bsc_nat.h | 1 + openbsc/src/nat/bsc_nat.c | 1 + 2 files changed, 2 insertions(+) diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 50be1dfec..c5a9258f6 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -120,6 +120,7 @@ struct sccp_connections { struct llist_head list_entry; struct bsc_connection *bsc; + struct bsc_msc_connection *msc_con; struct sccp_source_reference real_ref; struct sccp_source_reference patched_ref; diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 356025c98..ad5fcd19a 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -703,6 +703,7 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg) if (!create_sccp_src_ref(bsc, parsed)) goto exit2; con = patch_sccp_src_ref_to_msc(msg, parsed, bsc); + con->msc_con = bsc->nat->msc_con; con->con_type = con_type; con_found = 1; con_bsc = con->bsc;