diff options
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/gprs/sgsn_libgtp.c | 11 | ||||
-rw-r--r-- | openbsc/src/libiu/iu.c | 3 |
2 files changed, 7 insertions, 7 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index a19823d88..d1610a6ac 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -221,16 +221,13 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, memcpy(pdp->gsnlc.v, &sgsn->cfg.gtp_listenaddr.sin_addr, sizeof(sgsn->cfg.gtp_listenaddr.sin_addr)); - /* SGSN address for user plane */ + /* SGSN address for user plane + * Default to the control plane addr for now. If we are connected to a + * hnbgw via IuPS we'll need to send a PDP context update with the + * correct IP address after the RAB Assignment is complete */ pdp->gsnlu.l = sizeof(sgsn->cfg.gtp_listenaddr.sin_addr); -#if 1 - struct in_addr ia; - ia.s_addr = htonl(0xC0A80032); - memcpy(pdp->gsnlu.v, &ia, sizeof(ia)); -#else memcpy(pdp->gsnlu.v, &sgsn->cfg.gtp_listenaddr.sin_addr, sizeof(sgsn->cfg.gtp_listenaddr.sin_addr)); -#endif /* Assume we are a GERAN system */ pdp->rattype.l = 1; diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c index 33583aa82..1e440ffc6 100644 --- a/openbsc/src/libiu/iu.c +++ b/openbsc/src/libiu/iu.c @@ -286,6 +286,9 @@ static int ranap_handle_co_rab_ass_resp(struct ue_conn_ctx *ctx, RANAP_RAB_Assig LOGPC(DRANAP, LOGL_INFO, " Setup: (%u/%s)", rab_id, osmo_hexdump(item->transportLayerAddress->buf, item->transportLayerAddress->size)); + memcpy(pdp->lib->gsnlu.v, &item->transportLayerAddress->buf[3], 4); + gtp_update_context(pdp->ggsn->gsn, pdp->lib, pdp, &pdp->lib->hisaddr0); + } ranap_free_rab_setupormodifieditemies(&setup_ies); } |