summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-07 21:34:31 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-07 21:34:31 +0100
commit450710501b092986024c1348697477fdcfbf80ce (patch)
treed01b78f7a52bdc09a4ea3113d763129707225f23
parent1af212ab902f384462101e37a1b11012e04519ed (diff)
gb_proxy: differentiate between SGSN-facing and BSS-facing NS Instance
We start to differentiate between the two different NS Instances inside struct gbproxy_config. However, both elements are still initialized to the same (single) NS instance. Change-Id: I08c28bbc4cdf6ecfaa1ad62e547b45b58c967abb
-rw-r--r--openbsc/include/openbsc/gb_proxy.h3
-rw-r--r--openbsc/src/gprs/gb_proxy.c2
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c4
-rw-r--r--openbsc/src/gprs/gb_proxy_vty.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index c396d2bd1..2cdb942b2 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -92,7 +92,8 @@ struct gbproxy_config {
uint16_t nsip_sgsn_nsei;
/* misc */
- struct gprs_ns_inst *nsi;
+ struct gprs_ns_inst *sgsn_nsi;
+ struct gprs_ns_inst *bss_nsi;
/* Linked list of all Gb peers (except SGSN) */
struct llist_head bts_peers;
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 111f05208..a363bb956 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -1379,7 +1379,7 @@ int gbprox_signal(unsigned int subsys, unsigned int signal,
}
} else {
/* Forward this message to all NS-VC to BSS */
- struct gprs_ns_inst *nsi = cfg->nsi;
+ struct gprs_ns_inst *nsi = cfg->bss_nsi;
struct gprs_nsvc *next_nsvc;
llist_for_each_entry(next_nsvc, &nsi->gprs_nsvcs, list) {
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 0e017c624..6156dfff7 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
exit(1);
}
gbproxy_init_config(&gbcfg);
- gbcfg.nsi = bssgp_nsi;
+ gbcfg.bss_nsi = gbcfg.sgsn_nsi = bssgp_nsi;
gprs_ns_vty_init();
gprs_ns_set_log_ss(DNS);
bssgp_set_log_ss(DBSSGP);
@@ -274,7 +274,7 @@ int main(int argc, char **argv)
if (rc < 0)
exit(1);
- if (!gprs_nsvc_by_nsei(gbcfg.nsi, gbcfg.nsip_sgsn_nsei)) {
+ if (!gprs_nsvc_by_nsei(gbcfg.sgsn_nsi, gbcfg.nsip_sgsn_nsei)) {
LOGP(DGPRS, LOGL_FATAL, "You cannot proxy to NSEI %u "
"without creating that NSEI before\n",
gbcfg.nsip_sgsn_nsei);
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index 933b6b010..485381454 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -592,7 +592,7 @@ DEFUN(delete_gb_nsei, delete_gb_nsei_cmd,
}
if (delete_nsvc) {
- struct gprs_ns_inst *nsi = g_cfg->nsi;
+ struct gprs_ns_inst *nsi = g_cfg->bss_nsi;
struct gprs_nsvc *nsvc, *nsvc2;
counter = 0;