aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_init.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-14 23:30:30 +0800
committerHarald Welte <laforge@gnumonks.org>2010-03-22 19:02:04 +0800
commitaf387633db31059973e0ba59729802203b229248 (patch)
treecf2272e4f72a91f73586c4ed4658da6c94c82be3 /openbsc/src/bsc_init.c
parent97a282b037408438a876af81e2e9c5194c2bb69e (diff)
GPRS: make NSVC parameters VTY-configurable
Diffstat (limited to 'openbsc/src/bsc_init.c')
-rw-r--r--openbsc/src/bsc_init.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index 3fc818447..824820439 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -870,8 +870,13 @@ static void patch_nm_tables(struct gsm_bts *bts)
nanobts_attr_nsvc0[3] = bts->gprs.nsvc[0].nsvci >> 8;
nanobts_attr_nsvc0[4] = bts->gprs.nsvc[0].nsvci & 0xff;
- /* FIXME: patch our own IP address as SGSN IP */
- //nanobts_attr_nsvc0[10] =
+ /* patch IP address as SGSN IP */
+ *(u_int16_t *)(nanobts_attr_nsvc0+8) =
+ htons(bts->gprs.nsvc[0].remote_port);
+ *(u_int32_t *)(nanobts_attr_nsvc0+10) =
+ htonl(bts->gprs.nsvc[0].remote_ip);
+ *(u_int16_t *)(nanobts_attr_nsvc0+14) =
+ htons(bts->gprs.nsvc[0].local_port);
/* patch BVCI */
nanobts_attr_cell[12] = bts->gprs.cell.bvci >> 8;